Re: file upload speed.

2006-06-21 Thread CMSuser


Leon Rosenberg-3 wrote:
> 
> So you effectively measure the ability of tomcat to throw away your
> bytes and send you an error page. That doesn't make really sense, does
> it?
> 
> Leon
> 
Of course not. The uploaded file is visible on the webpage in the new
directory where it's supposed to be.

--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4987974
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using Datasource for cloudscape

2006-06-21 Thread Jitendra Kharche
 
Hi Dilan,

Have you got all the details about my problem.
 
Regards,
Jitendra Kharche

-Original Message-
From: Jitendra Kharche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 4:09 PM
To: Tomcat Users List
Subject: RE: Using Datasource for cloudscape

 
Hi Dilan,

Thanks for helping again.
I had attached files but it seems attachments are not allowed. I am
adding the contets of these files below. To keep the mail size samll I
am removing old contents of the mail. For the sake of clarity I am
putting my problem statement also.

Problem:
I am using Tomcat 5.5.17 and tried running a sample datasource
application having a jsp page (see contents below) using the Cloudscape
database. I have added the driver jar into CATALINA_HOME/common/lib
directory. When I run the jsp I get following exception
WARNING: Unexpected exception resolving reference
java.lang.NoSuchMethodException:
com.ibm.db2j.jdbc.DB2jDataSource.setScope(boolean)
at java.lang.Class.getMethod(Class.java:1581)
at
com.ibm.db2j.jdbc.DB2jAbstractDataSource.getObjectInstance(Unknown
Source)
  



Contents of file CATALINA_HOME/webapps/myApp/dbdemo.jsp


<%@ page import="javax.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%  
Connection con = null;
Statement stmt = null;
try {
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup("java:comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/MyDB");
System.out.println("Got DataSource\n");
con = ds.getConnection();
System.out.println("Got Connection\n"); }
catch(java.lang.Exception e) {
e.printStackTrace();
System.err.print(e.getClass().getName());
System.err.println(e.getMessage());
}

try {
stmt = con.createStatement();   
ResultSet rs = stmt.executeQuery("SELECT * FROM employee");
System.out.println("Table assignment after insertion:");
%>
Your table contains the following entries:


emp_idemp_nameemp_dept
<%
while (rs.next()) {
String emp_id = rs.getString("emp_id");
String emp_name  = rs.getString("emp_name");
String emp_dept = rs.getString("emp_dept");
%>


<%=emp_id%><%=emp_name%><%=emp_dept%>


<%
}
rs.close(); stmt.close(); con.close();
}
catch(java.lang.Exception e) {
e.printStackTrace();
}%>



Contents of file CATALINA_HOME/conf/server.xml




  
  
  
  
  



  
  





  
  
  

  




Contents of file CATALINA_HOME/webapps/myApp/WEB-INF/web.xml



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

datasourcedemo

index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



jdbc/MyDB
javax.sql.DataSource
Container





Contents of file CATALINA_HOME/webapps/myApp/META-INF/context.xml




   
 
Regards,
Jitendra Kharche


-
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe,
e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread Leon Rosenberg

So you effectively measure the ability of tomcat to throw away your
bytes and send you an error page. That doesn't make really sense, does
it?

Leon

On 6/22/06, CMSuser <[EMAIL PROTECTED]> wrote:



Leon Rosenberg-3 wrote:
>
> sorry, maybe i'm misunderstand a whole bunch of things here, but what
> exactly is your "appropriate url"?
>
> I mean, you can test download speed by accessing your own servlet or
> even static content, ok, but you can't upload anything without having
> a receiver for it.
>
> leon
>
I'm very new to this "web" stuff. What I did to get started was installed
the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and
named it "abc".
in the web.xml in the conf folder , set the readonly to false.
after that I just did a "put" from the client.

eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave
low throughput).
or with my java client, it's :
PutMethod pm = new PutMethod(url + "filename");
.
then I use HttpClient to executed the above putmethod. (this give's good
throughput ).
My guess is that the curl client itself was the bottleneck previously.
However the same curl client gave better upload speeds with other
webservers(Apache), so it's confusing.

regards,
Aman.



--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Http11AprProtocol took 2 hr to init on http-443

2006-06-21 Thread Jeff Chuang
To make port 80 use APR and port 443 NOT use APR, I have tried it 
several times, without any luck. After tomcat starts, port 80 is fine, 
but connections  to port 443 are always timeout. It looks from the log 
the Http11BaseProtocol was not used on port 443. The log looks like:


===
Jun 22, 2006 1:33:14 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Jun 22, 2006 1:33:14 PM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-443
Jun 22, 2006 1:33:14 PM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Jun 22, 2006 1:33:14 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1554 ms
Jun 22, 2006 1:33:14 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 22, 2006 1:33:14 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jun 22, 2006 1:33:14 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 22, 2006 1:33:15 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 22, 2006 1:33:15 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 22, 2006 1:33:15 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: 
[org.apache. 
webapp.balancer.RuleChain: 
[org.apache.webapp.balancer.rules.URLStringMatchRule: 
   Target string: News / Redirect URL: 
http://www.cnn.com], [org.apache.webapp.bal 
ancer.rules.RequestParameterRule: Target param name: 
paramName / Target param va 
lue: paramValue / Redirect URL: http://www.yahoo.com], 
[org.apache.webapp.balanc 
er.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]

Jun 22, 2006 1:33:15 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 22, 2006 1:33:15 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 22, 2006 1:33:16 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Jun 22, 2006 1:33:16 PM org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-443
Jun 22, 2006 1:33:16 PM org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
Jun 22, 2006 1:33:16 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jun 22, 2006 1:33:16 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2840 ms
=

I built the jni connectors without ssl:
./buildconf --with-apr=/usr/local/apr --without-ssl
./configure --with-apr=/usr/local/apr --without-ssl
make
make install


My connectors figuration:

   connectionTimeout="2" debug="0" 
disableUploadTimeout="true" />





port="443" maxHttpHeaderSize="8192"

maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true" 
debug="0" scheme="https"

secure="true" acceptCount="100" clientAuth="false"
keystoreType="PKCS12" 
keystoreFile="/data/CA/mycert.p12" keystorePass="mypass" />



Please correct me if anything wrong.

From my point of view, APR optimization on port 80 is very important 
for static content, but not important as on port 443. Since I could not 
wait Http11AprProtocol initialization on port 443 for 2+ hours on my 
FC5-amd_64, I would be very happy to see if Http11AprProtocol works on 
port 80 and Http11BaseProtocol works on port 443 with PKCS12 certificate.


Regards,

Jeff


Markus Schönhaber wrote:

Mladen Turk wrote:


Markus Schönhaber wrote:


Maybe someone of the devs chimes in and proves me right or wrong.


Use class="org.apache.coyote.http11.Http11BaseProtocol" inside



Thanks for proving me wrong ;-)

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread CMSuser


Leon Rosenberg-3 wrote:
> 
> sorry, maybe i'm misunderstand a whole bunch of things here, but what
> exactly is your "appropriate url"?
> 
> I mean, you can test download speed by accessing your own servlet or
> even static content, ok, but you can't upload anything without having
> a receiver for it.
> 
> leon
> 
I'm very new to this "web" stuff. What I did to get started was installed
the Tomcat 5.5.15 and copied one of the sub folders in webapps folder and
named it "abc".
in the web.xml in the conf folder , set the readonly to false.
after that I just did a "put" from the client.

eg. curl -T "file.txt" http://191.168.1.1:8080/abc/ . (This was what gave
low throughput).
or with my java client, it's : 
PutMethod pm = new PutMethod(url + "filename");
.
then I use HttpClient to executed the above putmethod. (this give's good
throughput ).
My guess is that the curl client itself was the bottleneck previously.
However the same curl client gave better upload speeds with other
webservers(Apache), so it's confusing.

regards,
Aman.



--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4987102
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: multiple tomcat services

2006-06-21 Thread Len Popp

Here's a how-to that was posted to this mailing list:
http://www.nabble.com/Re%3A-running-two-instances-of-tomcat-p3560229.html
I haven't tried it myself, but it looks pretty complicated so it must
be right. :-)
--
Len

On 6/21/06, Bharathi Kattamuri <[EMAIL PROTECTED]> wrote:

Hi,


I have installed multiple tomcat instances with apche server and  mod_jk
connector, in windows environment.

I have problem in configuring the tomcats as separate services.  Could
anyone suggest me how to install these tomcats as services.

Any help is appreciated.

with regards,
Bharathi
>
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mod_jk failover and preferring localhost

2006-06-21 Thread Filip Hanik - Dev Lists

Mladen Turk wrote:

Filip Hanik - Dev Lists wrote:
you've setup sticky_sessions to be false, (btw, I thought that only 
took 0/1 values) so how can you expect session affinity from that?




Recent mod_jk versions can take True/False instead 1/0 just
as an convenience method.

instead or "as well", the latter right?

Filip






--


Filip Hanik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat's scalability

2006-06-21 Thread anjan bacchu

hi GB,

 From catalina.bat

rem   CATALINA_HOME   May point at your Catalina "build" directory.
rem
rem   CATALINA_BASE   (Optional) Base directory for resolving dynamic
portions
rem   of a Catalina installation.  If not present, resolves
to
rem   the same directory that CATALINA_HOME points to.
rem

you can have multiple instances of tomcat with multiple directories for
CATALINA_BASE.

I'm not sure if there's any easy mechanism to predict if multiple
CATALINA_BASE will work better than multiple independent JVMs each pointing
to separate tomcat directories.

As an earlier user mentioned, run top to figure out how much CPU is being
sucked by Tomcat. BTW, which version of Tomcat and JVM are you using ? We
found Tomcat 5.5 to be much better(40% - 120%)  than 4.x or even 5.0x series
when used with JAVA 1.5.X.

Can you add some logging around your JDBC calls to SQL Server -- that way
you can find out the time consumed by the DB at 100 users versuse the
timings at 300 users.

BR,
~A

On 6/19/06, GB Developer <[EMAIL PROTECTED]> wrote:


How do you propose to add a 'separate instance of Tomcat' without 'adding
a
separate JVM'?

Or do you/others mean by 'instance of tomcat' = 'a separate physical
server
with single instance of JVM/Tomcat' ?

>
> So far it sounds that the approach of adding separate
> instance of Tomcat and using round robin is better than
> adding a separate JVM.
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
BR,
Anjan Bacchu
Summit Information Systems


Re: Tomcat's scalability

2006-06-21 Thread Andrew Miehs

Not only.

The issue is really whether it make sense to use the operating systems 
process table as a queue or not. Up until linux new threading model in 
Linux kernel 2.6 this was definitely the case. The 2.6 threads are very 
efficient, so most programmers will not notice a real performance 
degredation due to context switching. Threads are great, as long as they 
are used for the purposes of doing multiple jobs at a single time - 
missusing them as a 'connection queue' though is IMHO not a very smart 
idea - This is why I prefer ZEUS and Lighttpd instead of Apache as web 
servers.


Andrew

Alex Turner wrote:

This discussion focuses primarily on serving static files to a client, not
processing dynamic web pages.  Most people running tomcat are processing
dynamic pages, like getting data from a database and compositing a page
based on that data.

An FTP site, or a static web site will typically be I/O bound or Network
bound, and the only way to increase throughput it to increase the number of
I/Os per second that your server can manage or increase the size of your
network interface.  A java based dynamic website is typically not I/O 
bound,

but CPU bound, which posses a different set of challenges than a static FTP
server.

Alex.

On 6/21/06, Andrew Miehs <[EMAIL PROTECTED]> wrote:



Now that we are moving to the theoretical discussion, you will
probably want to have a look at

http://www.kegel.com/c10k.html



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: looking for memory profiler or dump analyzer for production use

2006-06-21 Thread Andrew Miehs
The monitoring component works for the first hour after the VM is 
started in the free version. In the commercial version, the monitoring 
information is availble the whole time - as for pricing - no idea..


There as an article about JRocket in one of the last IX magazines (DE)

Andrew

Leon Rosenberg wrote:

not sure, the vm itself is free, but i think the monitoring isn't.
we couldn't find any prices ourself too
leon

On 6/21/06, charly <[EMAIL PROTECTED]> wrote:


Thanks!

Doesn't this mean that it is free:



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: query

2006-06-21 Thread Andrew Braae

On at least one version of Oracle (10 IIRC), the default install hijacks
port 8080 for "Oracle XDB". When you say you have installed Oracle on a
different port, perhaps you are referring to the Oracle port for database
traffic, which is normally 1521 - this is a different port which I think is
web management tool).

I had trouble getting Oracle to stop grabbing 8080 and in the end I had to
change tomcat's port. I'm sure you can change Oracle somehow though.



On 6/22/06, veena v <[EMAIL PROTECTED]> wrote:


I have windows xp installed on my system. I installed tomcat 4.1 and
it
was working properly. But after installing oracle 9i tomcat is not working
though i have installed tomcat and oracle on different port. Please do
help
me.




Differences in tomcat on linux and windows???

2006-06-21 Thread antarix

Hi there!!

  What are the differences in apache-tomcat performance (in fact I have a
weird behaviour over an oracle database that´s the reason on my question to
the list) on windows and linux?? ... I have this doubt because my develop
environment is over windows and I have no problems updating information in
my database, but in my linux server on production sometimes seems the data
aren´t updating.I have check the logs on my linux box, but I can´t find
a logical reason (on win apache-tomcat release is 5.5 and on my linux
apache-tomcat 5.5.14 )

 Tnxs a lot!!!


Re: file upload speed.

2006-06-21 Thread Martin Gainty
I Agree
You should be debugging the code in doPut method..more specifically..
protected void doPut(HttpServletRequest req,
 HttpServletResponse resp)
  throws ServletException,
  //be mindful that if you get a java.io.IOException you cannot see the file.. 
OR
if your client sees a HTTP 501 then you have a content error (maybe its 
expecting text/html when the actual file is text or binary or whatever)

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Leon Rosenberg" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 2:16 PM
Subject: Re: file upload speed.


> sorry, maybe i'm misunderstand a whole bunch of things here, but what
> exactly is your "appropriate url"?
> 
> I mean, you can test download speed by accessing your own servlet or
> even static content, ok, but you can't upload anything without having
> a receiver for it.
> 
> leon
> 
> On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote:
>>
>>
>> Leon Rosenberg-3 wrote:
>> >
>> > I ment rather how do you handle the upload in tomcat?
>> >
>> I have not written any custom "upload handlers" on the web server side. I
>> just give the appropriate url to the "put client" and it's done.
>>
>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353
>> Sent from the Tomcat - User forum at Nabble.com.
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: looking for memory profiler or dump analyzer for production use

2006-06-21 Thread Edmon Begoli

There is a free memory/garbace collector analyzer jvmstat ver. 3 that you
can download from Sun:

http://java.sun.com/performance/jvmstat/

Another great tool that has free trial is JVM Optimizer:
http://www.arcturustech.com/jvm_optimizer.html

--
Thank you,
Edmon Begoli
http://blogs.ittoolbox.com/eai/software


Re: query

2006-06-21 Thread Martin Gainty
Good Afternoon Glenn-

For the reasons you just enumerated I ALWAYS install Oracle on its own box and 
ALWAYS point it to its own installed version of JVM..

Conversely-
I ALWAYS install Tomcat on its own box and point it to its own JVM

The thought of one (set of) processes exhausting the thread pool to the 
detriment of the other process may require planning-
Running Tomcat on a box dedicated to Oracle is a definite maybe..(assuming 
Oracle has been installed, configured to its own JVM)
Running latest versions of Oracle (10G Enterprise) on a box already running 
Tomcat might very well exhaust the orginal JVM's thread pool..

Many Thanks for the thoughtful post-
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Glenn Holliday" <>
To: "Tomcat Users List" 
Cc: 
Sent: Wednesday, June 21, 2006 4:36 PM
Subject: Re: query


> My first thought is Oracle will install its own Java Virtual Machine. 
> Oracle likes to be the entire world.  Is Tomcat still finding a JVM that 
> it can use?  Do you have the Oracle Universal Installer running?  What 
> happens if you run Oracle and Tomcat on two different computers?
> If that's not it, perhaps you could say what Oracle products you installed 
> (just the server?) and what symptoms you see when Tomcat is not working.
> 
> --
> Glenn Holliday
> Computer Sciences Corporation
> [EMAIL PROTECTED] 540-644-6636
> 
> 
> 
> This is a PRIVATE message. If you are not the intended recipient, please 
> delete without copying and kindly advise us by e-mail of the mistake in 
> delivery. NOTE: Regardless of content, this e-mail shall not operate to 
> bind CSC to any order or other contract unless pursuant to explicit 
> written agreement or government initiative expressly permitting the use of 
> e-mail for such purpose.
> 
> 
> 
> 
> 
> "veena v" <[EMAIL PROTECTED]> 
> 06/21/2006 02:11 PM
> Please respond to
> "Tomcat Users List" 
> 
> 
> To
> users@tomcat.apache.org
> cc
> 
> Subject
> query
> 
> 
> 
> 
> 
> 
> I have windows xp installed on my system. I installed tomcat 4.1 and 
> it
> was working properly. But after installing oracle 9i tomcat is not working
> though i have installed tomcat and oracle on different port. Please do 
> help
> me.
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: looking for memory profiler or dump analyzer for production use

2006-06-21 Thread Leon Rosenberg

not sure, the vm itself is free, but i think the monitoring isn't.
we couldn't find any prices ourself too
leon

On 6/21/06, charly <[EMAIL PROTECTED]> wrote:

Thanks!

Doesn't this mean that it is free:

"Freely Available! BEA JRockit is available for free download for evaluation and
production use."

i.e. that it can be used in production with no cost or licence fees?

Regards
Karl-Heinz


- Original Message -
From: "Leon Rosenberg" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 9:31 AM
Subject: Re: looking for memory profiler or dump analyzer for production use


> Hi,
>
> the one I know isn't free, but since you don't get many answers, try jrockit.
> Jrockit is actually not a memory dump analyzer but a (high
> performance) vm with extended monitoring support.
>
> http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products/jrockit/
>
> regards
> Leon
>
>
> On 6/19/06, charly <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I am looking for a (free) memory dump analyzer which is capable for being
>> used
>> in production on tomcat 5.5  @ w2k server.
>> That means it should not have a performance impact in every day operation,
>>  but should be able to generate memory dumps on request, which could be
>> analyzed
>> offline.
>> I have tried HAT  but it failed, showing errors on loading the created heap
>> files.
>> Then I found ariadna  (http://mernst.org/ariadna/) which "has an almost zero
>> overhead agent".
>> But it shows not much information. So I have tried extending ariadna.
>> (See this screenshot:
>> http://home.arcor.de/javadeveloper/ariadnaXT/instance_from_tomcat.png)
>> But there are unresolved issues/bugs. I wonder if there is not another tool,
>> which can be used every day.
>> Does anyone know about an memory (dump) analyzer,
>> which can be used on a tomcat production instance (W2K), i.e. with almost
>> zero
>> overhead?
>>
>> Karl-Heinz
>>
>>
>>
>>
>>
>>
>> ___
>> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
>> http://mail.yahoo.de
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>



___
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: looking for memory profiler or dump analyzer for production use

2006-06-21 Thread charly

Thanks!

Doesn't this mean that it is free:

"Freely Available! BEA JRockit is available for free download for evaluation and 
production use."


i.e. that it can be used in production with no cost or licence fees?

Regards
   Karl-Heinz


- Original Message - 
From: "Leon Rosenberg" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 9:31 AM
Subject: Re: looking for memory profiler or dump analyzer for production use



Hi,

the one I know isn't free, but since you don't get many answers, try jrockit.
Jrockit is actually not a memory dump analyzer but a (high
performance) vm with extended monitoring support.

http://www.bea.com/framework.jsp?CNT=index.htm&FP=/content/products/jrockit/

regards
Leon


On 6/19/06, charly <[EMAIL PROTECTED]> wrote:

Hello,

I am looking for a (free) memory dump analyzer which is capable for being 
used

in production on tomcat 5.5  @ w2k server.
That means it should not have a performance impact in every day operation,
 but should be able to generate memory dumps on request, which could be 
analyzed

offline.
I have tried HAT  but it failed, showing errors on loading the created heap
files.
Then I found ariadna  (http://mernst.org/ariadna/) which "has an almost zero
overhead agent".
But it shows not much information. So I have tried extending ariadna.
(See this screenshot:
http://home.arcor.de/javadeveloper/ariadnaXT/instance_from_tomcat.png)
But there are unresolved issues/bugs. I wonder if there is not another tool,
which can be used every day.
Does anyone know about an memory (dump) analyzer,
which can be used on a tomcat production instance (W2K), i.e. with almost 
zero

overhead?

Karl-Heinz






___
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: 
http://mail.yahoo.de


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat shutdown Problems - Process Does Not Die

2006-06-21 Thread Derek McEachern

I've been searching the list but so far I have not been able to find a
solution to problem.  I am running tomcat 4.1.31 using java 1.4.2 on a
Solaris 8 machine.  In our configuration we are running two tomcat instances
sharing binaries and webapps directories by CATALINE_HOME and  CATALINE_BASE
to the specific tomcat config.

Tomcat starts without a problem but for some reason when running the
shutdown script it doesn't kill the process however it does close it's
sockets.  It's configured to listen on 9080 for requests and 9005 for
shutdown requests and after executing the shutdown script those ports are no
longer being listened to and it is possible to start another tomcat.

Anyone have any idea on why the actual process would not be dieing?

Derek


Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Garey Mills
David -

Thanks for the clear, concise answer.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Smith wrote:

> On first response, Tomcat both set's a cookie JSESSIONID and appends the 
> same to the page links (when properly coded). If the cookie comes back 
> on the next request, url rewriting is dropped in favor of the cookie. No 
> magic, tomcat just covers all it's bases up front.
> 
> See HttpServletResponse.encodeURL(String) in the servlet spec for more info.
> 
> -- David
> 
> Garey Mills wrote:
> > David -
> >
> > Tomcat uses cookies to establish a session with the browser. If it
> > can't use cookies, it uses URL rewriting. So whenever someone uses my app,
> > Tomcat tries to set a cookie. 
> >
> > If it was the case that Tomcat didn't know whether the browser
> > accepted cookies until after it tried to set one at the first access,
> > users of browsers that did not accept cookies would not have a session
> > that recorded their first access. I don't think that would be considered
> > acceptable, so I assume that Tomcat knows, before my app is reached,
> > whether the browser accepts cookies. But is my assumption correct, I don't
> > know. That is what I am asking.
> >
> >
> > 
> >
> > Garey Mills
> > Library Systems Office
> > UC Berkeley
> >
> > The brain is not where you think
> >
> > On Wed, 21 Jun 2006, David Kerber wrote:
> >
> >   
> >> Why would it try until your app tells it to?  AFAIK (admittedly, not 
> >> very far; I don't use cookies)  think it needs to be handled by your app.
> >>
> >>
> >> Garey Mills wrote:
> >>
> >> 
> >>> David -
> >>>
> >>>   Well, okay then, but how can my app find out what Tomcat knows
> >>> about whether the browser accepts cookies or not? And when does Tomcat
> >>> try? Before control is passed to my app?
> >>>
> >>> Garey Mills
> >>> Library Systems Office
> >>> UC Berkeley
> >>>
> >>> The brain is not where you think
> >>>
> >>> On Wed, 21 Jun 2006, David Kerber wrote:
> >>>
> >>>  
> >>>
> >>>   
>  I think what he's getting at is that Tomcat (or any other web server) 
>  cannot tell how a browser is set wrt cookies without trying to set one 
>  and then seeing if it's there.
> 
>  Garey Mills wrote:
> 
> 
> 
>  
> > Martin -
> >
> > I guess I'm being obtuse, but WHAT won't work? What I want to 
> > know
> > is how Tomcat detects whether the browser accepts cookies, that is,
> > whether it is set to accept cookies or not?
> >
> > Garey Mills
> > Library Systems Office
> > UC Berkeley
> >
> > The brain is not where you think
> >
> > On Wed, 21 Jun 2006, Martin Gainty wrote:
> >
> >
> >
> >  
> >
> >   
> >> Garey-
> >>
> >> Unfortunately that wont work if your Browser disallows cookies
> >> If its IE 
> >> Check out the IE options-
> >>
> >> Tools
> >> Internet Options
> >> Privacy
> >> Advanced
> >> look at "switched on Always allow Session Cookies"
> >>
> >> HTH,
> >>
> >> Martin --
> >> *
> >> This email message and any files transmitted with it contain 
> >> confidential
> >> information intended only for the person(s) to whom this email message 
> >> is
> >> addressed.  If you have received this email message in error, please 
> >> notify
> >> the sender immediately by telephone or email and destroy the original
> >> message without making a copy.  Thank you.
> >>
> >>
> >>
> >> - Original Message - 
> >> From: "Garey Mills" <[EMAIL PROTECTED]>
> >> To: "Tomcat Users List" 
> >> Sent: Wednesday, June 21, 2006 12:50 PM
> >> Subject: Re: How does Tomcat detect whether a browser accepts cookies
> >>
> >>
> >>   
> >>
> >>
> >>
> >> 
> >>> Leon -
> >>>
> >>> Thank you for your response, but I don't understand it. I have a
> >>> key question: 
> >>>
> >>> how does Tomcat detect that a browser does not accept cookies?
> >>>
> >>>
> >>> There are a number of different ways to detect it inside my
> >>> application, but all of them seem to need a roundtrip to the browser. 
> >>> If,
> >>> as I suspect, Tomcat can tell without the redirect, I would like to 
> >>> use
> >>> Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to 
> >>> use
> >>> Tomcat's knowledge, so that I don't have to duplicate the work inside 
> >>> my
> >>> app.
> >>>
> >>> Garey Mills
> >>> Library Systems Office
> >>> UC Berkeley
> >>>
> >>> The brain is not where you think
> >>>
> >>> On Wed, 21 Jun 2006, Leon Rosenberg wrote:
> >>>
> >>> 
> >>>
> >>>  
> >>

Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread David Smith
On first response, Tomcat both set's a cookie JSESSIONID and appends the 
same to the page links (when properly coded). If the cookie comes back 
on the next request, url rewriting is dropped in favor of the cookie. No 
magic, tomcat just covers all it's bases up front.


See HttpServletResponse.encodeURL(String) in the servlet spec for more info.

-- David

Garey Mills wrote:

David -

Tomcat uses cookies to establish a session with the browser. If it
can't use cookies, it uses URL rewriting. So whenever someone uses my app,
Tomcat tries to set a cookie. 


If it was the case that Tomcat didn't know whether the browser
accepted cookies until after it tried to set one at the first access,
users of browsers that did not accept cookies would not have a session
that recorded their first access. I don't think that would be considered
acceptable, so I assume that Tomcat knows, before my app is reached,
whether the browser accepts cookies. But is my assumption correct, I don't
know. That is what I am asking.




Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

  
Why would it try until your app tells it to?  AFAIK (admittedly, not 
very far; I don't use cookies)  think it needs to be handled by your app.



Garey Mills wrote:



David -

Well, okay then, but how can my app find out what Tomcat knows
about whether the browser accepts cookies or not? And when does Tomcat
try? Before control is passed to my app?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

 

  
I think what he's getting at is that Tomcat (or any other web server) 
cannot tell how a browser is set wrt cookies without trying to set one 
and then seeing if it's there.


Garey Mills wrote:

   



Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:



 

  

Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-


Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


  

   



Leon -

Thank you for your response, but I don't understand it. I have a
key question: 


how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:



 

  

You could check for your cookie in first request and if not present
just set the cookie in the  request and redirect to another page which
reads  the cookie (btw, it can also be done with javascript without
user-visible-reload). The difference to your approach that each user
will be redirected exactly once, since you are checking for your
cookie in first request and it should remain persistent for next
visits.

regards
Leon

On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
  

   



Hi -

  I have an application that does not work correctly when the
browser does not accept cookies. I added some code that rewrites the query
string the first time the app is entered to include a new parameter and
then redirects to the app. I watch for that parameter and if I find it I
check whether the session id is from a cookie. If it isn't I put up a
"Sorry, you need cookies message" and exit.

  This solution is not optimal, since I am seeing a blank page the
first time I try to get into the application.

  So my question is: Tomcat must ascertain whether the browser
accepts cookies in order to decide whether to use cookies or URL
rewriting. How does it do it? and can I check Tomcat to fin

Re: query

2006-06-21 Thread Glenn Holliday
My first thought is Oracle will install its own Java Virtual Machine. 
Oracle likes to be the entire world.  Is Tomcat still finding a JVM that 
it can use?  Do you have the Oracle Universal Installer running?  What 
happens if you run Oracle and Tomcat on two different computers?
If that's not it, perhaps you could say what Oracle products you installed 
(just the server?) and what symptoms you see when Tomcat is not working.

--
Glenn Holliday
Computer Sciences Corporation
[EMAIL PROTECTED] 540-644-6636



This is a PRIVATE message. If you are not the intended recipient, please 
delete without copying and kindly advise us by e-mail of the mistake in 
delivery. NOTE: Regardless of content, this e-mail shall not operate to 
bind CSC to any order or other contract unless pursuant to explicit 
written agreement or government initiative expressly permitting the use of 
e-mail for such purpose.





"veena v" <[EMAIL PROTECTED]> 
06/21/2006 02:11 PM
Please respond to
"Tomcat Users List" 


To
users@tomcat.apache.org
cc

Subject
query






I have windows xp installed on my system. I installed tomcat 4.1 and 
it
was working properly. But after installing oracle 9i tomcat is not working
though i have installed tomcat and oracle on different port. Please do 
help
me.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JNDI Resource Factories questions

2006-06-21 Thread Ludovic_Orban

Hi,

I've fot a couple of questions regarding Tomcat's JNDI implementation.

In the JNDI resources howto of Tomcat 5.5
(http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html) at
paragraph 'Adding Custom Resource Factories', just under '1. Write A
Resource Factory Class' one can read this:

...Every time your web application calls lookup() on a context entry that is
bound to this factory, the getObjectInstance() method is called...

I tried with Tomcat 5.5.17 and it seems that this statement is wrong:
getObjectInstance() only get called only at the first lookup() call then it
seems the result is cached somewhere by Tomcat to serve future request.

I also noticed that the 2nd parameter of getObjectInstance() method (Name
jndiNameObject) seems to loose the path information. Let me explain:

I've got a web app with this context.xml file located in the META-INF
folder:







The string get properly bound to the ENC so you can look it up with
ctx.lookup("java:comp/env/config/someKey");

Unfortunately, in the getObjectInstance() method the jndiNameObject
parameter only appears to be 'someKey'. It seems there is no way to find
back that it was bound as 'config/someKey'.

Is that on purpose ? Did I miss something ?

Another thing: is there a good reason why bindings configured in the
server.xml's GlobalNamingResources tag have to be linked by web app contexts
? Why isn't there a way to access this content using some global URL, like
"/config/someKey" ?

Last but not least, I found the answer to Remy's question:
http://www.nabble.com/Re%3A-UserTransaction%2C-JOTM-and-Tomcat-5.5.x-p2803063.html

Just do this to hijack the java: ENC:

System.setProperty("java.naming.factory.initial", "the.carol.factory");

Thanks in advance,
Ludovic
--
View this message in context: 
http://www.nabble.com/JNDI-Resource-Factories-questions-t1826017.html#a4980937
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk failover and preferring localhost

2006-06-21 Thread thuss2

That explains it, thanks. I've just set the lbfactor extremely high on the
localhost in the interim to get mod_jk to prefer it over remote tomcats.

-Todd
--
View this message in context: 
http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4980806
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk failover and preferring localhost

2006-06-21 Thread Mladen Turk

Filip Hanik - Dev Lists wrote:
you've setup sticky_sessions to be false, (btw, I thought that only took 
0/1 values) so how can you expect session affinity from that?




Recent mod_jk versions can take True/False instead 1/0 just
as an convenience method.

Also the 'distance' param will be supported with
the next 1.2.16 release.


Regards,
Mladen.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk failover and preferring localhost

2006-06-21 Thread thuss2

Filip, we're not using sessions so we don't need sessions affinity, but if we
did we'd use session replication rather than sticky sessions. The sticky
option does accept true/false according to the documentation
http://tomcat.apache.org/connectors-doc/config/workers.html . I think that's
all unrelated to the issue we're seeing though which is that mod_jk seems to
be completely ignoring the distance parameter.

-Todd
--
View this message in context: 
http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4980476
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: mod_jk failover and preferring localhost

2006-06-21 Thread Filip Hanik - Dev Lists
you've setup sticky_sessions to be false, (btw, I thought that only took 
0/1 values) so how can you expect session affinity from that?


Filip


thuss2 wrote:

We have 10 web servers with Tomcat's running on them and a mod_jk
configuration to prefer the tomcat on localhost and only failover to another
machine if the local one fails. This worked fine under our older mod_jk,
however, we just upgraded to 1.2.15 and now it that the local_worker
properties are no longer supported, it's load balancing every request.

So I checked out the workers.properties options page:
http://tomcat.apache.org/connectors-doc/config/workers.html and noticed the
new distance option so that I can give localhost a distance of 0 and
everything else a greater distance so that the load balancer should always
prefer localhost. However, it seems to be ignoring the distance property
completely and load balancing every request. Can anyone suggest what I might
try to get it to always use the local tomcat for requests unless it fails:

worker.list=tomcat
worker.tomcat.type=lb
worker.tomcat.socket_timeout=195
worker.tomcat.balance_workers=localhost,latin1,latin2,...
worker.tomcat.sticky_session=False

worker.localhost.port=8009
worker.localhost.host=localhost
worker.localhost.type=ajp13
worker.localhost.lbfactor=1
worker.localhost.distance=0

worker.latin1.port=8009
worker.latin1.host=latin1
worker.latin1.type=ajp13
worker.latin1.lbfactor=1
worker.latin1.distance=1

worker.latin2.port=8009
worker.latin2.host=latin2
worker.latin2.type=ajp13
worker.latin2.lbfactor=1
worker.latin2.distance=1

Thanks,
Todd

--
View this message in context: 
http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4979143
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--


Filip Hanik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread David Kerber
Ok, now I understand what you're getting at, but I still don't see how 
tomcat could know if a browser accepts cookies on the initial request 
from the browser (which seems to be what your assumption would 
require).  I wouldn't mind a bit if I were proven wrong, though...


Dave


Garey Mills wrote:


David -

Tomcat uses cookies to establish a session with the browser. If it
can't use cookies, it uses URL rewriting. So whenever someone uses my app,
Tomcat tries to set a cookie. 


If it was the case that Tomcat didn't know whether the browser
accepted cookies until after it tried to set one at the first access,
users of browsers that did not accept cookies would not have a session
that recorded their first access. I don't think that would be considered
acceptable, so I assume that Tomcat knows, before my app is reached,
whether the browser accepts cookies. But is my assumption correct, I don't
know. That is what I am asking.




Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

 

Why would it try until your app tells it to?  AFAIK (admittedly, not 
very far; I don't use cookies)  think it needs to be handled by your app.



Garey Mills wrote:

   


David -

Well, okay then, but how can my app find out what Tomcat knows
about whether the browser accepts cookies or not? And when does Tomcat
try? Before control is passed to my app?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:



 

I think what he's getting at is that Tomcat (or any other web server) 
cannot tell how a browser is set wrt cookies without trying to set one 
and then seeing if it's there.


Garey Mills wrote:

  

   


Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:





 


Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-


Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


 

  

   


Leon -

Thank you for your response, but I don't understand it. I have a
key question: 


how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:

   



 


You could check for your cookie in first request and if not present
just set the cookie in the  request and redirect to another page which
reads  the cookie (btw, it can also be done with javascript without
user-visible-reload). The difference to your approach that each user
will be redirected exactly once, since you are checking for your
cookie in first request and it should remain persistent for next
visits.

regards
Leon

On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
 

  

   


Hi -

 I have an application that does not work correctly when the
browser does not accept cookies. I added some code that rewrites the query
string the first time the app is entered to include a new parameter and
then redirects to the app. I watch for that parameter and if I find it I
check whether the session id is from a cookie. If it isn't I put up a
"Sorry, you need cookies message" and exit.

 This solution is not optimal, since I am seeing a blank page the
first time I try to get into the application.

 So my question is: Tomcat must ascertain whether the browser
accepts cookies in order to decide whether to use cookies or URL
rewriting. How does it do it? and can I check Tomcat to find out, too?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you t

Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Garey Mills
David -

Tomcat uses cookies to establish a session with the browser. If it
can't use cookies, it uses URL rewriting. So whenever someone uses my app,
Tomcat tries to set a cookie. 

If it was the case that Tomcat didn't know whether the browser
accepted cookies until after it tried to set one at the first access,
users of browsers that did not accept cookies would not have a session
that recorded their first access. I don't think that would be considered
acceptable, so I assume that Tomcat knows, before my app is reached,
whether the browser accepts cookies. But is my assumption correct, I don't
know. That is what I am asking.




Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

> Why would it try until your app tells it to?  AFAIK (admittedly, not 
> very far; I don't use cookies)  think it needs to be handled by your app.
> 
> 
> Garey Mills wrote:
> 
> >David -
> >
> > Well, okay then, but how can my app find out what Tomcat knows
> >about whether the browser accepts cookies or not? And when does Tomcat
> >try? Before control is passed to my app?
> >
> >Garey Mills
> >Library Systems Office
> >UC Berkeley
> >
> >The brain is not where you think
> >
> >On Wed, 21 Jun 2006, David Kerber wrote:
> >
> >  
> >
> >>I think what he's getting at is that Tomcat (or any other web server) 
> >>cannot tell how a browser is set wrt cookies without trying to set one 
> >>and then seeing if it's there.
> >>
> >>Garey Mills wrote:
> >>
> >>
> >>
> >>>Martin -
> >>>
> >>>   I guess I'm being obtuse, but WHAT won't work? What I want to know
> >>>is how Tomcat detects whether the browser accepts cookies, that is,
> >>>whether it is set to accept cookies or not?
> >>>
> >>>Garey Mills
> >>>Library Systems Office
> >>>UC Berkeley
> >>>
> >>>The brain is not where you think
> >>>
> >>>On Wed, 21 Jun 2006, Martin Gainty wrote:
> >>>
> >>> 
> >>>
> >>>  
> >>>
> Garey-
> 
> Unfortunately that wont work if your Browser disallows cookies
> If its IE 
> Check out the IE options-
> 
> Tools
> Internet Options
> Privacy
> Advanced
> look at "switched on Always allow Session Cookies"
> 
> HTH,
> 
> Martin --
> *
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please 
> notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> 
> 
> - Original Message - 
> From: "Garey Mills" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Wednesday, June 21, 2006 12:50 PM
> Subject: Re: How does Tomcat detect whether a browser accepts cookies
> 
> 
>    
> 
> 
> 
> >Leon -
> >
> >Thank you for your response, but I don't understand it. I have a
> >key question: 
> >
> >how does Tomcat detect that a browser does not accept cookies?
> >
> >
> >There are a number of different ways to detect it inside my
> >application, but all of them seem to need a roundtrip to the browser. If,
> >as I suspect, Tomcat can tell without the redirect, I would like to use
> >Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
> >Tomcat's knowledge, so that I don't have to duplicate the work inside my
> >app.
> >
> >Garey Mills
> >Library Systems Office
> >UC Berkeley
> >
> >The brain is not where you think
> >
> >On Wed, 21 Jun 2006, Leon Rosenberg wrote:
> >
> > 
> >
> >  
> >
> >>You could check for your cookie in first request and if not present
> >>just set the cookie in the  request and redirect to another page which
> >>reads  the cookie (btw, it can also be done with javascript without
> >>user-visible-reload). The difference to your approach that each user
> >>will be redirected exactly once, since you are checking for your
> >>cookie in first request and it should remain persistent for next
> >>visits.
> >>
> >>regards
> >>Leon
> >>
> >>On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
> >>   
> >>
> >>
> >>
> >>>Hi -
> >>>
> >>>   I have an application that does not work correctly when the
> >>>browser does not accept cookies. I added some code that rewrites the 
> >>>query
> >>>string the first time the app is entered to include a new parameter and
> >>>then redirects to the app. I watch for that parameter and if I find it 
> >>>I
> >>>check whether the session id is from a cookie. If it isn't I put up a
> >>>"Sorry, you need

Re: file upload speed.

2006-06-21 Thread Leon Rosenberg

sorry, maybe i'm misunderstand a whole bunch of things here, but what
exactly is your "appropriate url"?

I mean, you can test download speed by accessing your own servlet or
even static content, ok, but you can't upload anything without having
a receiver for it.

leon

On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote:



Leon Rosenberg-3 wrote:
>
> I ment rather how do you handle the upload in tomcat?
>
I have not written any custom "upload handlers" on the web server side. I
just give the appropriate url to the "put client" and it's done.



--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread David Kerber
Why would it try until your app tells it to?  AFAIK (admittedly, not 
very far; I don't use cookies)  think it needs to be handled by your app.



Garey Mills wrote:


David -

Well, okay then, but how can my app find out what Tomcat knows
about whether the browser accepts cookies or not? And when does Tomcat
try? Before control is passed to my app?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

 

I think what he's getting at is that Tomcat (or any other web server) 
cannot tell how a browser is set wrt cookies without trying to set one 
and then seeing if it's there.


Garey Mills wrote:

   


Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:



 


Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-


Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


  

   


Leon -

Thank you for your response, but I don't understand it. I have a
key question: 


how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:



 


You could check for your cookie in first request and if not present
just set the cookie in the  request and redirect to another page which
reads  the cookie (btw, it can also be done with javascript without
user-visible-reload). The difference to your approach that each user
will be redirected exactly once, since you are checking for your
cookie in first request and it should remain persistent for next
visits.

regards
Leon

On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
  

   


Hi -

  I have an application that does not work correctly when the
browser does not accept cookies. I added some code that rewrites the query
string the first time the app is entered to include a new parameter and
then redirects to the app. I watch for that parameter and if I find it I
check whether the session id is from a cookie. If it isn't I put up a
"Sorry, you need cookies message" and exit.

  This solution is not optimal, since I am seeing a blank page the
first time I try to get into the application.

  So my question is: Tomcat must ascertain whether the browser
accepts cookies in order to decide whether to use cookies or URL
rewriting. How does it do it? and can I check Tomcat to find out, too?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think
 





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-21 Thread Leon Rosenberg

I really should have added instructions :-)

but ok, here they are

goto
http://moskito.anotheria.net/download/nightly/
and download the nightly (actually daily) build

http://moskito.anotheria.net/download/nightly/moskito-dist.2006-06-21.tar.gz

you can check the contents of the demowebapp (moskitodemo.war) on how
to integrate but  actually you need to perform few steps:

unjar moskito-webui-jsps.jar into webapps/YOURWEBAPP
unjar moskito-webui-config.jar into webapps/YOURWEBAPP/WEB-INF/classes

add moskito-core.jar, moskito-webui.jar and moskito-web.jar into
webapps/YOURWEBAPP/WEB-INF/lib

copy all libs from moskito-dist/lib into webapps/YOURWEBAPP/WEB-INF/lib

add following to the web.xml:


   RequestURIFilter
   
net.java.dev.moskito.web.filters.RequestURIFilter

limit
100

   

   
   RequestURIFilter
   /*
   

this way the filter will monitor each request to the root webapp.
change the url-pattern to your webapp name. The limit parameter to the
filter-class definition should correspond with the your apps uris. The
background is that moskito adds uris dynamically, as the requests
come, so if you don't limit it, some bad guys could fire nonsense
request at your webapp and force an OutOfMemory. Therefore set it to
1000 or something.

with the above steps you are fine, and the filter should monitor by
now. However, for moskito-user-interface you need two more steps,
since it requires struts

1. add the moskitoui servlet to your webxml:

   moskitoUI
   
net.java.dev.moskito.webui.MoskitoUIServlet
   
 application
 ApplicationResources
   
   
config
   
/WEB-INF/classes/struts-config-moskito.xml,
   

1
   


moskitoUI
/mui/*


2. add struts tlds to your webapp, for example
webapps/YOURWEBAPP/WEB-INF/tld

and then to your web.xml: (note if you are using web.xml version 2.4
you have to surround taglib tags with jsp-config tag.


/tags/struts-html
/WEB-INF/tld/struts-html.tld


/tags/struts-bean
/WEB-INF/tld/struts-bean.tld


/tags/struts-logic
/WEB-INF/tld/struts-logic.tld


that all

feel free to contact me off list if you are stuck somewhere

leon


On 6/21/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:


This looks perfect.  It's what I need.  However...
I've been all over the website below.  I don't see how to install this
through web.xml.  I see how to extend a servlet.  I'm using JSP.  So,
that's a little more difficult.

Thanks,
Rick

Leon Rosenberg wrote:
> look at this:
>
> http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers
>
> RequestURIFilter is probably what you want
>
> you can install this monitoring application by simply adding a filter
> entry to your web.xml. This way you'll see which requests are
> currently executed and which uris lasting how long. It might give you
> a hint what's hanging.
>
> Leon
>
> On 6/20/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>
>> Not sure what you mean.  I can recompile and deploy the code with no
>> problems.  So, probably...
>>
>>
>>
>> Leon Rosenberg wrote:
>> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I wish it would give me a stack trace.  That would be wonderful.  The
>> >> part I left out was just a list of all the loaded libraries.
>> >>
>> >> I can't risk a switch in software.  I realize this is a tough one.  I
>> >> have very little flexibility to help me debug.  That's why I'm asking
>> >> you guys!
>> >
>> > Are you allowed to add a new filter?
>> > If yes I have a solution for you :-)
>> >
>> >>
>> >> Thanks,
>> >> Rick
>> >>
>> >>
>> >>
>> >> Leon Rosenberg wrote:
>> >> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >> OK.  I finally got a file dumped out from this kill.  But, it
>> doesn't
>> >> >> look interesting to me.  Any idea what this means to me?
>> >> >>
>> >> >> Any other debug ideas?
>> >> >
>> >> > a) paste complete stack trace
>> >> > b) try a regular vm (suns for example)
>> >> >
>> >> > regards
>> >> > Leon
>> >> >>
>> >> >> Thanks,
>> >> >> Rick
>> >> >>
>> >> >> Unexpected Signal : 3 occurred at PC=0x45C6D876
>> >> >> Function=(null)+0x45C6D876
>> >> >> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>> >> >>
>> >> >> NOTE: We are unable to locate the function name symbol for the
>> error
>> >> >>   just occurred. Please refer to release documentation for
>> >> possible
>> >> >>   reason and solutions.
>> >> >>
>> >> >> Dynamic libraries:
>> >> >> 08048000-08057000 r-xp  08:03 815431
>> >> >> /opt/blackdown-jdk-1.4.2.01/bin/java
>> >> >> ...
>> >> >> ...etc.
>> >> >>
>> >> >> Heap at VM Abort:
>> >> >> Heap
>> >> >>  P

query

2006-06-21 Thread veena v

I have windows xp installed on my system. I installed tomcat 4.1 and it
was working properly. But after installing oracle 9i tomcat is not working
though i have installed tomcat and oracle on different port. Please do help
me.


Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Garey Mills
David -

Well, okay then, but how can my app find out what Tomcat knows
about whether the browser accepts cookies or not? And when does Tomcat
try? Before control is passed to my app?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, David Kerber wrote:

> I think what he's getting at is that Tomcat (or any other web server) 
> cannot tell how a browser is set wrt cookies without trying to set one 
> and then seeing if it's there.
> 
> Garey Mills wrote:
> 
> >Martin -
> >
> > I guess I'm being obtuse, but WHAT won't work? What I want to know
> >is how Tomcat detects whether the browser accepts cookies, that is,
> >whether it is set to accept cookies or not?
> >
> >Garey Mills
> >Library Systems Office
> >UC Berkeley
> >
> >The brain is not where you think
> >
> >On Wed, 21 Jun 2006, Martin Gainty wrote:
> >
> >  
> >
> >>Garey-
> >>
> >>Unfortunately that wont work if your Browser disallows cookies
> >>If its IE 
> >>Check out the IE options-
> >>
> >>Tools
> >>Internet Options
> >>Privacy
> >>Advanced
> >>look at "switched on Always allow Session Cookies"
> >>
> >>HTH,
> >>
> >>Martin --
> >>*
> >>This email message and any files transmitted with it contain confidential
> >>information intended only for the person(s) to whom this email message is
> >>addressed.  If you have received this email message in error, please notify
> >>the sender immediately by telephone or email and destroy the original
> >>message without making a copy.  Thank you.
> >>
> >>
> >>
> >>- Original Message - 
> >>From: "Garey Mills" <[EMAIL PROTECTED]>
> >>To: "Tomcat Users List" 
> >>Sent: Wednesday, June 21, 2006 12:50 PM
> >>Subject: Re: How does Tomcat detect whether a browser accepts cookies
> >>
> >>
> >>
> >>
> >>>Leon -
> >>>
> >>>Thank you for your response, but I don't understand it. I have a
> >>>key question: 
> >>>
> >>>how does Tomcat detect that a browser does not accept cookies?
> >>>
> >>>
> >>>There are a number of different ways to detect it inside my
> >>>application, but all of them seem to need a roundtrip to the browser. If,
> >>>as I suspect, Tomcat can tell without the redirect, I would like to use
> >>>Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
> >>>Tomcat's knowledge, so that I don't have to duplicate the work inside my
> >>>app.
> >>>
> >>>Garey Mills
> >>>Library Systems Office
> >>>UC Berkeley
> >>>
> >>>The brain is not where you think
> >>>
> >>>On Wed, 21 Jun 2006, Leon Rosenberg wrote:
> >>>
> >>>  
> >>>
> You could check for your cookie in first request and if not present
> just set the cookie in the  request and redirect to another page which
> reads  the cookie (btw, it can also be done with javascript without
> user-visible-reload). The difference to your approach that each user
> will be redirected exactly once, since you are checking for your
> cookie in first request and it should remain persistent for next
> visits.
> 
> regards
> Leon
> 
> On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
> 
> 
> >Hi -
> >
> >I have an application that does not work correctly when the
> >browser does not accept cookies. I added some code that rewrites the 
> >query
> >string the first time the app is entered to include a new parameter and
> >then redirects to the app. I watch for that parameter and if I find it I
> >check whether the session id is from a cookie. If it isn't I put up a
> >"Sorry, you need cookies message" and exit.
> >
> >This solution is not optimal, since I am seeing a blank page the
> >first time I try to get into the application.
> >
> >So my question is: Tomcat must ascertain whether the browser
> >accepts cookies in order to decide whether to use cookies or URL
> >rewriting. How does it do it? and can I check Tomcat to find out, too?
> >
> >Garey Mills
> >Library Systems Office
> >UC Berkeley
> >
> >The brain is not where you think
> >  
> >
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread David Kerber
I think what he's getting at is that Tomcat (or any other web server) 
cannot tell how a browser is set wrt cookies without trying to set one 
and then seeing if it's there.


Garey Mills wrote:


Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:

 


Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-


Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


   


Leon -

Thank you for your response, but I don't understand it. I have a
key question: 


how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:

 


You could check for your cookie in first request and if not present
just set the cookie in the  request and redirect to another page which
reads  the cookie (btw, it can also be done with javascript without
user-visible-reload). The difference to your approach that each user
will be redirected exactly once, since you are checking for your
cookie in first request and it should remain persistent for next
visits.

regards
Leon

On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
   


Hi -

   I have an application that does not work correctly when the
browser does not accept cookies. I added some code that rewrites the query
string the first time the app is entered to include a new parameter and
then redirects to the app. I watch for that parameter and if I find it I
check whether the session id is from a cookie. If it isn't I put up a
"Sorry, you need cookies message" and exit.

   This solution is not optimal, since I am seeing a blank page the
first time I try to get into the application.

   So my question is: Tomcat must ascertain whether the browser
accepts cookies in order to decide whether to use cookies or URL
rewriting. How does it do it? and can I check Tomcat to find out, too?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think
 





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk failover and preferring localhost

2006-06-21 Thread thuss2

We have 10 web servers with Tomcat's running on them and a mod_jk
configuration to prefer the tomcat on localhost and only failover to another
machine if the local one fails. This worked fine under our older mod_jk,
however, we just upgraded to 1.2.15 and now it that the local_worker
properties are no longer supported, it's load balancing every request.

So I checked out the workers.properties options page:
http://tomcat.apache.org/connectors-doc/config/workers.html and noticed the
new distance option so that I can give localhost a distance of 0 and
everything else a greater distance so that the load balancer should always
prefer localhost. However, it seems to be ignoring the distance property
completely and load balancing every request. Can anyone suggest what I might
try to get it to always use the local tomcat for requests unless it fails:

worker.list=tomcat
worker.tomcat.type=lb
worker.tomcat.socket_timeout=195
worker.tomcat.balance_workers=localhost,latin1,latin2,...
worker.tomcat.sticky_session=False

worker.localhost.port=8009
worker.localhost.host=localhost
worker.localhost.type=ajp13
worker.localhost.lbfactor=1
worker.localhost.distance=0

worker.latin1.port=8009
worker.latin1.host=latin1
worker.latin1.type=ajp13
worker.latin1.lbfactor=1
worker.latin1.distance=1

worker.latin2.port=8009
worker.latin2.host=latin2
worker.latin2.type=ajp13
worker.latin2.lbfactor=1
worker.latin2.distance=1

Thanks,
Todd

--
View this message in context: 
http://www.nabble.com/mod_jk-failover-and-preferring-localhost-t1825380.html#a4979143
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Garey Mills
Martin -

I guess I'm being obtuse, but WHAT won't work? What I want to know
is how Tomcat detects whether the browser accepts cookies, that is,
whether it is set to accept cookies or not?

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Martin Gainty wrote:

> Garey-
> 
> Unfortunately that wont work if your Browser disallows cookies
> If its IE 
> Check out the IE options-
> 
> Tools
> Internet Options
> Privacy
> Advanced
> look at "switched on Always allow Session Cookies"
> 
> HTH,
> 
> Martin --
> *
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
> 
> 
> 
> - Original Message - 
> From: "Garey Mills" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" 
> Sent: Wednesday, June 21, 2006 12:50 PM
> Subject: Re: How does Tomcat detect whether a browser accepts cookies
> 
> 
> > Leon -
> > 
> > Thank you for your response, but I don't understand it. I have a
> > key question: 
> > 
> > how does Tomcat detect that a browser does not accept cookies?
> > 
> > 
> > There are a number of different ways to detect it inside my
> > application, but all of them seem to need a roundtrip to the browser. If,
> > as I suspect, Tomcat can tell without the redirect, I would like to use
> > Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
> > Tomcat's knowledge, so that I don't have to duplicate the work inside my
> > app.
> > 
> > Garey Mills
> > Library Systems Office
> > UC Berkeley
> > 
> > The brain is not where you think
> > 
> > On Wed, 21 Jun 2006, Leon Rosenberg wrote:
> > 
> >> You could check for your cookie in first request and if not present
> >> just set the cookie in the  request and redirect to another page which
> >> reads  the cookie (btw, it can also be done with javascript without
> >> user-visible-reload). The difference to your approach that each user
> >> will be redirected exactly once, since you are checking for your
> >> cookie in first request and it should remain persistent for next
> >> visits.
> >> 
> >> regards
> >> Leon
> >> 
> >> On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
> >> > Hi -
> >> >
> >> > I have an application that does not work correctly when the
> >> > browser does not accept cookies. I added some code that rewrites the 
> >> > query
> >> > string the first time the app is entered to include a new parameter and
> >> > then redirects to the app. I watch for that parameter and if I find it I
> >> > check whether the session id is from a cookie. If it isn't I put up a
> >> > "Sorry, you need cookies message" and exit.
> >> >
> >> > This solution is not optimal, since I am seeing a blank page the
> >> > first time I try to get into the application.
> >> >
> >> > So my question is: Tomcat must ascertain whether the browser
> >> > accepts cookies in order to decide whether to use cookies or URL
> >> > rewriting. How does it do it? and can I check Tomcat to find out, too?
> >> >
> >> > Garey Mills
> >> > Library Systems Office
> >> > UC Berkeley
> >> >
> >> > The brain is not where you think
> >> >
> >> >
> >> > -
> >> > To start a new topic, e-mail: users@tomcat.apache.org
> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> > For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >> 
> >> -
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> 
> >> 
> > 
> > 
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat session replication/cluster

2006-06-21 Thread Filip Hanik - Dev Lists
if the cluster is put in the engine element, the context names are 
prefixed with the engine name, since you can have multiple contexts with 
the same name in different host
when reloading a context, you'll get these errors cause the context is 
not available during the reload

this will be fixed with the new Apache Tribes module
Filip

Pid wrote:

I'm seeing an issue on 5.5.17 with a 2 node cluster config.
When a context is reloaded, it sends the context node name incorrectly
to the cluster.
E.g. context is called "website1"

SEVERE: Context manager doesn't exist:website1website1

The config I'm using is exactly the same as the default from server.xml,
except the cluster is defined in Engine, rather than each Host.




Filip Hanik - Dev Lists wrote:
  

also, use Tomcat 5.5.17

Sean O'Reilly wrote:


Hi,

I am trying to get in-memory session replication working and am testing
running 3 seperate tomcat instances on the same server.

I am using tomcat-5.5.15 and apache-2.0.54 with jk2.

Whenever i run my test app although it should be doing round-robin load
balancing it doesn't switch to another instance of tomcat until the
eighth request and does not appear to have sent the session information
across as the session ID changes.

Here are my server.xml and workers2.properties files

server.xml



  
  
  
  
  


  
  







  

  

  
  





















jvmRoute="Tomcat5A">  
 

  
  

  

  
  

  
  

  

  

  

  

  
  

 
   

className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"

managerClassName="org.apache.catalina.cluster.session.DeltaManager"

 expireSessionsOnShutdown="false"
 useDirtyFlag="true"
 notifyListenersOnReplication="true">

className="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>

className="org.apache.catalina.cluster.tcp.ReplicationListener"

tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>

   
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"

replicationMode="pooled"
ackTimeout="15000"/>

  
filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>


   
  

  














  



  




workers2.properties

[logger.apache2]
file="/etc/httpd/conf/logs/error.log"
level=INFO
debug=1

# Config settings
[config]
file=/etc/httpd/conf/workers2.properties
debug=0

# Shared memory file settings
[shm]
file=/etc/httpd/conf/jk2.shm
size=10

# Communcation channel settings for "Tomcat5A"
[channel.socket:localhost:8009]
host=localhost
port=8009
tomcatId=Tomcat5A
group=balanced
lb_factor=1
route=Tomcat5A


# Declare a Tomcat5A worker
[ajp13:localhost:8009]
channel=channel.socket:Tomcat5A


# Communcation channel settings for "Tomcat5B"
[channel.socket:localhost:8010]
host=localhost
port=8010
tomcatId=Tomcat5B
group=balanced
lb_factor=1
route=Tomcat5B


# Declare a Tomcat5B worker
[ajp13:localhost:8010]
channel=channel.socket:Tomcat5B


# Communcation channel settings for "Tomcat5C"
[channel.socket:localhost:8011]
host=localhost
port=8011
tomcatId=Tomcat5C
group=balanced
lb_factor=1
route=Tomcat5C


# Declare a Tomcat5C worker
[ajp13:localhost:8011]
channel=channel.socket:Tomcat5C

# Load balanced Worker
[lb:balanced]
worker=ajp13:localhost:8009
worker=ajp13:localhost:8010
worker=ajp13:localhost:8011
timeout=90
attempts=3
recovery=30
stickySession=0
noWorkerMsg=Server Busy please retry later.
noWorkerCodeMsg=503

# URI mappings for the tomcat worker
# Map the "jsp-examples" web application context to the web server URI
space
[uri:/jsp-examples/*]
info= Mapping for jsp-examples context for tomcat
context=/jsp-examples
group=balanced

[shm]
file=/etc/httpd/conf/jk2.shm
size=100

[uri:/servlets-examples/*]
context=/servlets-examples
group=balanced

# Define a status worker
[status:]

# Status URI mapping
[uri:/jkstatus/*]
group=status


obviously the server.xml files on the other 2 instances of tomcat are
the same except the ports and jvmRoute have been changed.


can anyone see where i am going wrong ?

Thanks



  
  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--


Filip Hanik

---

Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Martin Gainty
Garey-

Unfortunately that wont work if your Browser disallows cookies
If its IE 
Check out the IE options-

Tools
Internet Options
Privacy
Advanced
look at "switched on Always allow Session Cookies"

HTH,

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Garey Mills" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 12:50 PM
Subject: Re: How does Tomcat detect whether a browser accepts cookies


> Leon -
> 
> Thank you for your response, but I don't understand it. I have a
> key question: 
> 
> how does Tomcat detect that a browser does not accept cookies?
> 
> 
> There are a number of different ways to detect it inside my
> application, but all of them seem to need a roundtrip to the browser. If,
> as I suspect, Tomcat can tell without the redirect, I would like to use
> Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
> Tomcat's knowledge, so that I don't have to duplicate the work inside my
> app.
> 
> Garey Mills
> Library Systems Office
> UC Berkeley
> 
> The brain is not where you think
> 
> On Wed, 21 Jun 2006, Leon Rosenberg wrote:
> 
>> You could check for your cookie in first request and if not present
>> just set the cookie in the  request and redirect to another page which
>> reads  the cookie (btw, it can also be done with javascript without
>> user-visible-reload). The difference to your approach that each user
>> will be redirected exactly once, since you are checking for your
>> cookie in first request and it should remain persistent for next
>> visits.
>> 
>> regards
>> Leon
>> 
>> On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
>> > Hi -
>> >
>> > I have an application that does not work correctly when the
>> > browser does not accept cookies. I added some code that rewrites the query
>> > string the first time the app is entered to include a new parameter and
>> > then redirects to the app. I watch for that parameter and if I find it I
>> > check whether the session id is from a cookie. If it isn't I put up a
>> > "Sorry, you need cookies message" and exit.
>> >
>> > This solution is not optimal, since I am seeing a blank page the
>> > first time I try to get into the application.
>> >
>> > So my question is: Tomcat must ascertain whether the browser
>> > accepts cookies in order to decide whether to use cookies or URL
>> > rewriting. How does it do it? and can I check Tomcat to find out, too?
>> >
>> > Garey Mills
>> > Library Systems Office
>> > UC Berkeley
>> >
>> > The brain is not where you think
>> >
>> >
>> > -
>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> 
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: mod_jk Status Busy Number

2006-06-21 Thread Troy Davidson

Here is that data a bit better:

NameTypeHostAddrStatFVAccErrWr
RdBusyMaxRRCd


tomcat24ajp1310.9.100.2:2400910.9.100.2:24009Stopped
1659803960 0 429496729448   
 
tomcat14ajp1310.9.100.1:1400910.9.100.1:14009OK1
91669452320 0 1976  

tomcat15ajp1310.9.100.1:1500910.9.100.1:15009Stopped
1659812990 0 429496729258  

tomcat34ajp1310.9.100.3:3400910.9.100.3:34009OK1
81669452110 0 1197  

tomcat35ajp1310.9.100.3:3500910.9.100.3:35009Stopped
1759878860 0 429496729351


Troy Davidson wrote:
We are doing load balancing with Apache and mod_jk.  We have five 
instances of Tomcat running on three servers.  Two Tomcat instances 
are fine.  But, Three Tomcat instances show really high "Busy" numbers 
on the Status page.  Here is what it looks like:


NameTypeHostAddrStatFVAccErrWr
RdBusyMaxRRCd
tomcat24ajp1310.9.100.2:2400910.9.100.2:24009
Stopped1659803960 0 4294967294
48  tomcat14ajp1310.9.100.1:14009
10.9.100.1:14009OK191669452320 0 19
76  tomcat15ajp1310.9.100.1:15009
10.9.100.1:15009Stopped1659812990 0 
429496729258  tomcat34ajp1310.9.100.3:34009
10.9.100.3:34009OK181669452110 0 11
97  tomcat35ajp1310.9.100.3:35009
10.9.100.3:35009Stopped1759878860 0 
429496729351
The number of Busy connections are over 4 billion?!?!  I didn't think 
we were that popular.  ;)


The strange thing is that these numbers come and go with each refresh 
of the page.  They will be there, hit refresh, and they are gone.  Hit 
refresh again, and they are back.  The numbers will only bounce 
between those three instances.  The tomcat14 and tomcat34 won't see 
them, and work fine.


We have had to stop those three since it was affecting the app.  It 
seems session replication was affected.  As soon as those three were 
stopped, things work fine.
The configs of the five instances are identical except for ports 
obviously.  Has anyone seen a similar behavior?  Thanks.




--
++
Troy Davidson
Java Programmer
PC/Web Team

CMC/Flex
8520 South Sandy Parkway
Sandy, UT  84070
(801) 365-5000
www.cmcflex.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does Tomcat detect whether a browser accepts cookies

2006-06-21 Thread Garey Mills
Leon -

Thank you for your response, but I don't understand it. I have a
key question: 

how does Tomcat detect that a browser does not accept cookies?


There are a number of different ways to detect it inside my
application, but all of them seem to need a roundtrip to the browser. If,
as I suspect, Tomcat can tell without the redirect, I would like to use
Tomcat's knowledge. If Tomcat uses a roundtrip, I would still like to use
Tomcat's knowledge, so that I don't have to duplicate the work inside my
app.

Garey Mills
Library Systems Office
UC Berkeley

The brain is not where you think

On Wed, 21 Jun 2006, Leon Rosenberg wrote:

> You could check for your cookie in first request and if not present
> just set the cookie in the  request and redirect to another page which
> reads  the cookie (btw, it can also be done with javascript without
> user-visible-reload). The difference to your approach that each user
> will be redirected exactly once, since you are checking for your
> cookie in first request and it should remain persistent for next
> visits.
> 
> regards
> Leon
> 
> On 6/21/06, Garey Mills <[EMAIL PROTECTED]> wrote:
> > Hi -
> >
> > I have an application that does not work correctly when the
> > browser does not accept cookies. I added some code that rewrites the query
> > string the first time the app is entered to include a new parameter and
> > then redirects to the app. I watch for that parameter and if I find it I
> > check whether the session id is from a cookie. If it isn't I put up a
> > "Sorry, you need cookies message" and exit.
> >
> > This solution is not optimal, since I am seeing a blank page the
> > first time I try to get into the application.
> >
> > So my question is: Tomcat must ascertain whether the browser
> > accepts cookies in order to decide whether to use cookies or URL
> > rewriting. How does it do it? and can I check Tomcat to find out, too?
> >
> > Garey Mills
> > Library Systems Office
> > UC Berkeley
> >
> > The brain is not where you think
> >
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



mod_jk Status Busy Number

2006-06-21 Thread Troy Davidson
We are doing load balancing with Apache and mod_jk.  We have five 
instances of Tomcat running on three servers.  Two Tomcat instances are 
fine.  But, Three Tomcat instances show really high "Busy" numbers on 
the Status page.  Here is what it looks like:


NameTypeHostAddrStatFVAccErrWr
RdBusyMaxRRCd
tomcat24ajp1310.9.100.2:2400910.9.100.2:24009Stopped
1659803960 0 429496729448  
tomcat14ajp1310.9.100.1:1400910.9.100.1:14009OK1
91669452320 0 1976  
tomcat15ajp1310.9.100.1:1500910.9.100.1:15009Stopped
1659812990 0 429496729258  
tomcat34ajp1310.9.100.3:3400910.9.100.3:34009OK1
81669452110 0 1197  
tomcat35ajp1310.9.100.3:3500910.9.100.3:35009Stopped
1759878860 0 429496729351 

The number of Busy connections are over 4 billion?!?!  I didn't think we 
were that popular.  ;)


The strange thing is that these numbers come and go with each refresh of 
the page.  They will be there, hit refresh, and they are gone.  Hit 
refresh again, and they are back.  The numbers will only bounce between 
those three instances.  The tomcat14 and tomcat34 won't see them, and 
work fine.


We have had to stop those three since it was affecting the app.  It 
seems session replication was affected.  As soon as those three were 
stopped, things work fine. 

The configs of the five instances are identical except for ports 
obviously.  Has anyone seen a similar behavior?  Thanks.


--
++
Troy Davidson
Java Programmer
PC/Web Team

CMC/Flex
8520 South Sandy Parkway
Sandy, UT  84070
(801) 365-5000
www.cmcflex.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat session replication/cluster

2006-06-21 Thread Pid
I'm seeing an issue on 5.5.17 with a 2 node cluster config.
When a context is reloaded, it sends the context node name incorrectly
to the cluster.
E.g. context is called "website1"

SEVERE: Context manager doesn't exist:website1website1

The config I'm using is exactly the same as the default from server.xml,
except the cluster is defined in Engine, rather than each Host.




Filip Hanik - Dev Lists wrote:
> also, use Tomcat 5.5.17
> 
> Sean O'Reilly wrote:
>> Hi,
>>
>> I am trying to get in-memory session replication working and am testing
>> running 3 seperate tomcat instances on the same server.
>>
>> I am using tomcat-5.5.15 and apache-2.0.54 with jk2.
>>
>> Whenever i run my test app although it should be doing round-robin load
>> balancing it doesn't switch to another instance of tomcat until the
>> eighth request and does not appear to have sent the session information
>> across as the session ID changes.
>>
>> Here are my server.xml and workers2.properties files
>>
>> server.xml
>>
>> 
>>
>>   
>>   
>>   > className="org.apache.catalina.mbeans.ServerLifecycleListener" />
>>   > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
>> />
>>   > className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
>>
>>
>>   
>>   
>>
>> 
>> > value="30"/>
>>
>> 
>> >   type="org.apache.catalina.UserDatabase"
>>description="User database that can be updated and saved"
>>factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>>   pathname="conf/tomcat-users.xml" />
>>
>>   
>>
>>   
>>
>>   
>>   
>>
>> 
>>
>> 
>> 
>> 
>> 
>>
>> 
>> 
>>
>> 
>> > redirectPort="8443"
>> protocol="AJP/1.3" />
>>
>> 
>> 
>> 
>>
>> 
>>
>> 
>> > jvmRoute="Tomcat5A">  
>>  
>>
>>   
>>   
>>
>>   
>>
>>   
>>   >  resourceName="UserDatabase"/>
>>
>>   
>>   
>>
>>   
>>
>>   
>>
>>   
>>
>>   
>>
>>   
>>   >unpackWARs="true" autoDeploy="true"
>>xmlValidation="false" xmlNamespaceAware="false">
>>
>>  
>>
>> > className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>> 
>> managerClassName="org.apache.catalina.cluster.session.DeltaManager"
>>  expireSessionsOnShutdown="false"
>>  useDirtyFlag="true"
>>  notifyListenersOnReplication="true">
>>
>> > className="org.apache.catalina.cluster.mcast.McastService"
>> mcastAddr="228.0.0.4"
>> mcastPort="45564"
>> mcastFrequency="500"
>> mcastDropTime="3000"/>
>>
>> > className="org.apache.catalina.cluster.tcp.ReplicationListener"
>> tcpListenAddress="auto"
>> tcpListenPort="4001"
>> tcpSelectorTimeout="100"
>> tcpThreadCount="6"/>
>>
>> >
>> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
>> replicationMode="pooled"
>> ackTimeout="15000"/>
>>
>> > className="org.apache.catalina.cluster.tcp.ReplicationValve"
>>   
>> filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
>>
>>> className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
>>   tempDir="/tmp/war-temp/"
>>   deployDir="/tmp/war-deploy/"
>>   watchDir="/tmp/war-listen/"
>>   watchEnabled="false"/>
>>   > className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
>> 
>>   
>>
>>
>> 
>> 
>>
>> 
>> 
>>
>> 
>> 
>> 
>> 
>>
>>   
>>
>> 
>>
>>   
>>
>> 
>>
>>
>> workers2.properties
>>
>> [logger.apache2]
>> file="/etc/httpd/conf/logs/error.log"
>> level=INFO
>> debug=1
>>
>> # Config settings
>> [config]
>> file=/etc/httpd/conf/workers2.properties
>> debug=0
>>
>> # Shared memory file settings
>> [shm]
>> file=/etc/httpd/conf/jk2.shm
>> size=10
>>
>> # Communcation channel settings for "Tomcat5A"
>> [channel.socket:localhost:8009]
>> host=localhost
>> port=8009
>> tomcatId=Tomcat5A
>> group=balanced
>> lb_factor=1
>> route=Tomcat5A
>>
>>
>> # Declare a Tomcat5A worker
>> [ajp13:localhost:8009]
>> channel=channel.socket:Tomcat5A
>>
>>
>> # Communcation channel settings for "Tomcat5B"
>> [channel.socket:localhost:8010]
>> host=localhost
>> port=8010
>> tomcatId=Tomcat5B
>> group=balanced
>> lb_factor=1
>> route=Tomcat5B
>>
>>
>> # Declare a Tomcat5B worker
>> [ajp13:localhost:8010]
>> channel=channel.socket:Tomcat5B
>>
>>
>> # Communcation channel settings for "Tomcat5C"
>> [channel.socket:localhost:8011]
>> host=localhost
>> port=8011
>> tomcatId=Tomcat5C
>> gro

Re: tomcat in-memory session replication

2006-06-21 Thread Sean O'Reilly
On Wed, 21 Jun 2006 11:26:28 -0500
Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

> also, use Tomcat 5.5.17
> 
> Sean O'Reilly wrote:
> > Hi,
> >
> > I am trying to get in-memory session replication working and am
> > testing running 3 seperate tomcat instances on the same server.
> >
> > I am using tomcat-5.5.15 and apache-2.0.54 with jk2.
> >
> > Whenever i run my test app although it should be doing round-robin
> > load balancing it doesn't switch to another instance of tomcat
> > until the eighth request and does not appear to have sent the
> > session information across as the session ID changes.
> >
> > Here are my server.xml and workers2.properties files
> >
> > server.xml
> >
> > 
> >
> >   
> >> className="org.apache.catalina.core.AprLifecycleListener" />
> >  > className="org.apache.catalina.mbeans.ServerLifecycleListener" />
> >  > className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
> >  > className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/>
> >
> >   
> >   
> >
> > 
> >  > value="30"/>
> >
> > 
> >  >   type="org.apache.catalina.UserDatabase"
> >description="User database that can be updated and saved"
> >factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
> >   pathname="conf/tomcat-users.xml" />
> >
> >   
> >
> >   
> >
> >   
> >   
> >
> > 
> >
> > 
> > 
> > 
> > 
> >
> > 
> > 
> >
> > 
> >  >enableLookups="false" redirectPort="8443"
> > protocol="AJP/1.3" />
> >
> > 
> > 
> > 
> >
> > 
> >
> > 
> >  > jvmRoute="Tomcat5A"> 
> >  
> >  
> > 
> >
> >   
> >   
> >
> >   
> >
> >   
> >>  resourceName="UserDatabase"/>
> >
> >   
> >   
> >
> >   
> >
> >   
> >
> >   
> >
> >   
> >
> >   
> >>unpackWARs="true" autoDeploy="true"
> >xmlValidation="false" xmlNamespaceAware="false">
> >
> >  
> > 
> > 
> >
> >  > className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
> >  
> > managerClassName="org.apache.catalina.cluster.session.DeltaManager"
> >  expireSessionsOnShutdown="false"
> >  useDirtyFlag="true"
> >  notifyListenersOnReplication="true">
> >
> >  > className="org.apache.catalina.cluster.mcast.McastService"
> > mcastAddr="228.0.0.4"
> > mcastPort="45564"
> > mcastFrequency="500"
> > mcastDropTime="3000"/>
> >
> >  > 
> > className="org.apache.catalina.cluster.tcp.ReplicationListener"
> > tcpListenAddress="auto"
> > tcpListenPort="4001"
> > tcpSelectorTimeout="100"
> > tcpThreadCount="6"/>
> >
> >  > 
> > className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
> > replicationMode="pooled"
> > ackTimeout="15000"/>
> >
> >  > className="org.apache.catalina.cluster.tcp.ReplicationValve"
> >
> > filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
> >
> >  > className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
> >   tempDir="/tmp/war-temp/"
> >   deployDir="/tmp/war-deploy/"
> >   watchDir="/tmp/war-listen/"
> >   watchEnabled="false"/>
> >   
> >  > className="org.apache.catalina.cluster.session.ClusterSessionListener"/>
> > 
> >
> >
> >
> >
> > 
> > 
> >
> > 
> > 
> >
> > 
> > 
> > 
> > 
> >
> >   
> >
> > 
> >
> >   
> >
> > 
> >
> >
> > workers2.properties
> >
> > [logger.apache2]
> > file="/etc/httpd/conf/logs/error.log"
> > level=INFO
> > debug=1
> >
> > # Config settings
> > [config]
> > file=/etc/httpd/conf/workers2.properties
> > debug=0
> >
> > # Shared memory file settings
> > [shm]
> > file=/etc/httpd/conf/jk2.shm
> > size=10
> >
> > # Communcation channel settings for "Tomcat5A"
> > [channel.socket:localhost:8009]
> > host=localhost
> > port=8009
> > tomcatId=Tomcat5A
> > group=balanced
> > lb_factor=1
> > route=Tomcat5A
> >
> >
> > # Declare a Tomcat5A worker
> > [ajp13:localhost:8009]
> > channel=channel.socket:Tomcat5A
> >
> >
> > # Communcation channel settings for "Tomcat5B"
> > [channel.socket:localhost:8010]
> > host=localhost
> > port=8010
> > tomcatId=Tomcat5B
> > group=balanced
> > lb_factor=1
> > route=Tomcat5B
> >
> >
> > # Declare a Tomcat5B worker
> > [ajp13:localhost:8010]
> > channel=channel.socket:Tomcat5B
> >
> >
> > # Communcation channel settings for "Tomcat5C"
> > [channel.socket:localhost:8011]
> > hos

Re: Question about StandardSession and ApplicationContext

2006-06-21 Thread Filip Hanik - Dev Lists
the StandardSession is not big, I would go back and guess it is your 
application.

The key is to read the profiling data correctly, that's where I would start.
Tomcat has been optimized for memory and cpu usage, so 11MB session 
objects would have been discovered early on.


John McClain wrote:

I am profiling our application in jprofiler. I have noticed that the deep
size of StandardSession object for each user is VERY large - ~ 11+mb. Yet I
know that we are not adding that much data. Where is all that memory coming
from? Is it truly non static data that is overhead for each session, or is
it static data that each session points to?

Does anyone out there have a strategy for finding memory leaks in a Tomcat
application? I am not finding ours.

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
"Skepticism is the first step toward truth"


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--


Filip Hanik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do I set up a default context for a virtual host

2006-06-21 Thread Pid
If you put wiki.war into c:/wiki it will deploy and create
 c:/wiki/wiki/
then the app will (if it's working) be available at:
 http://server:port/wiki/


teknokrat wrote:
> Yeah, I have. If you have a look at the bottom I have a ROOT.xml with

Read it again.

> 
> 
> I have tried using just  with no success
> 
> Pid wrote:
>> Read the docs:
>>
>> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>>
>> Context path attribute: "The value of this field must not be set except
>> when statically defining a Context in server.xml, as it will be infered
>> from the filenames used for either the .xml context file or the docBase."

This means that if you put the context element inside the host in
server.xml, you CAN set the path, BUT if you put it in
$CATALINA/conf/Catalina/host/ then the path attribute *is ignored*.

By not setting the docBase the server is looking in "c:/wiki", but as
we've established, your app is in "c:/wiki/wiki"
What does the context.xml in the wiki.war/META-INF contain?

Configure it so:
 tomcat/conf/Catalina/wiki.net/ROOT.xml
contains
 

And server.xml contains
 ...
 

And c:/wiki/ contains a directory called ROOT with the application
completely deployed inside it. (Deploying it as ROOT.war should do the
trick).


Oh, and it is auto-deploying the war file, right?







>>
>>
>>
>>
>> teknokrat wrote:
>>> I trying to setup virtual hosts on tomcat 5.5. and windows.
>>>
>>> I have added the following to server.xml
>>>
>>> 
>>>   >> directory="logs"  prefix="wiki_log." suffix=".log"
>>> timestamp="true"/>
>>> 
>>>
>>> I have added context.xml to conf/Catalina/wiki.net containing
>>>
>>> 
>>>
>>> Then I have added wiki.war to C:\wiki and restarted tomcat.
>>>
>>> Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
>>> resource not available.
>>>
>>> I have tried changing the application name to ROOT.war and the
>>> context.xml file to ROOT.xml containing
>>>
>>> 
>>>
>>> But this still produces nothing.
>>>
>>> How can I set up tomcat so that going to http://wiki.net runs my
>>> wiki.war?
>>>
>>>
>>> -
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat in-memory session replication

2006-06-21 Thread Filip Hanik - Dev Lists

also, use Tomcat 5.5.17

Sean O'Reilly wrote:

Hi,

I am trying to get in-memory session replication working and am testing
running 3 seperate tomcat instances on the same server.

I am using tomcat-5.5.15 and apache-2.0.54 with jk2.

Whenever i run my test app although it should be doing round-robin load
balancing it doesn't switch to another instance of tomcat until the
eighth request and does not appear to have sent the session information
across as the session ID changes.

Here are my server.xml and workers2.properties files

server.xml



  

  
  
  
  

  
  







  

  

  
  












   enableLookups="false" redirectPort="8443"

protocol="AJP/1.3" />








jvmRoute="Tomcat5A"> 
 
 


  
  

  

  
  

  
  

  

  

  

  

  
  

 






className="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>

className="org.apache.catalina.cluster.tcp.ReplicationListener"

tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>




   

className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
  tempDir="/tmp/war-temp/"
  deployDir="/tmp/war-deploy/"
  watchDir="/tmp/war-listen/"
  watchEnabled="false"/>
  

className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

   















  



  




workers2.properties

[logger.apache2]
file="/etc/httpd/conf/logs/error.log"
level=INFO
debug=1

# Config settings
[config]
file=/etc/httpd/conf/workers2.properties
debug=0

# Shared memory file settings
[shm]
file=/etc/httpd/conf/jk2.shm
size=10

# Communcation channel settings for "Tomcat5A"
[channel.socket:localhost:8009]
host=localhost
port=8009
tomcatId=Tomcat5A
group=balanced
lb_factor=1
route=Tomcat5A


# Declare a Tomcat5A worker
[ajp13:localhost:8009]
channel=channel.socket:Tomcat5A


# Communcation channel settings for "Tomcat5B"
[channel.socket:localhost:8010]
host=localhost
port=8010
tomcatId=Tomcat5B
group=balanced
lb_factor=1
route=Tomcat5B


# Declare a Tomcat5B worker
[ajp13:localhost:8010]
channel=channel.socket:Tomcat5B


# Communcation channel settings for "Tomcat5C"
[channel.socket:localhost:8011]
host=localhost
port=8011
tomcatId=Tomcat5C
group=balanced
lb_factor=1
route=Tomcat5C


# Declare a Tomcat5C worker
[ajp13:localhost:8011]
channel=channel.socket:Tomcat5C

# Load balanced Worker
[lb:balanced]
worker=ajp13:localhost:8009
worker=ajp13:localhost:8010
worker=ajp13:localhost:8011
timeout=90
attempts=3
recovery=30
stickySession=0
noWorkerMsg=Server Busy please retry later.
noWorkerCodeMsg=503

# URI mappings for the tomcat worker
# Map the "jsp-examples" web application context to the web server URI
space
[uri:/jsp-examples/*]
info= Mapping for jsp-examples context for tomcat
context=/jsp-examples
group=balanced

[shm]
file=/etc/httpd/conf/jk2.shm
size=100

[uri:/servlets-examples/*]
context=/servlets-examples
group=balanced

# Define a status worker
[status:]

# Status URI mapping
[uri:/jkstatus/*]
group=status


obviously the server.xml files on the other 2 instances of tomcat are
the same except the ports and jvmRoute have been changed.


can anyone see where i am going wrong ?

Thanks



  



--


Filip Hanik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: tomcat in-memory session replication

2006-06-21 Thread Filip Hanik - Dev Lists
you have two issues and would be better off trying to isolate them 
separately.


1. Session replication not working
To Troubleshoot: Isolate the problem, so in this case, get rid of 
apache/mod_jk

Follow these steps:
1. Get a small load balancer like http://siag.nu/pen/
If you are on windows, download http://siag.nu/pub/pen/pen.exe

2. Stop all your apache instances

3. Change the HTTP connector in your server.xml to not have keep alive
maxKeepAliveRequests="1"

4. Start your load balancer
pen.exe -r -f 80 localhost:8080 localhost:8081 localhost:8082

5. Hit your server, http://localhost/yourtestapp
and see round robin working.

6. Is your session data replicating?

If not follow these steps:
1. Have you give each tomcat a unique TCP listen port for replication
  see tcpListenPort in the Cluster config, should be a unique value for 
each tomcat


2. Are your tomcat instances discovering each other
  Should show up in the logs

Filip



Sean O'Reilly wrote:

Hi,

I am trying to get in-memory session replication working and am testing
running 3 seperate tomcat instances on the same server.

I am using tomcat-5.5.15 and apache-2.0.54 with jk2.

Whenever i run my test app although it should be doing round-robin load
balancing it doesn't switch to another instance of tomcat until the
eighth request and does not appear to have sent the session information
across as the session ID changes.

Here are my server.xml and workers2.properties files

server.xml



  

  
  
  
  

  
  







  

  

  
  












   enableLookups="false" redirectPort="8443"

protocol="AJP/1.3" />








jvmRoute="Tomcat5A"> 
 
 


  
  

  

  
  

  
  

  

  

  

  

  
  

 






className="org.apache.catalina.cluster.mcast.McastService"

mcastAddr="228.0.0.4"
mcastPort="45564"
mcastFrequency="500"
mcastDropTime="3000"/>

className="org.apache.catalina.cluster.tcp.ReplicationListener"

tcpListenAddress="auto"
tcpListenPort="4001"
tcpSelectorTimeout="100"
tcpThreadCount="6"/>




   

className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
  tempDir="/tmp/war-temp/"
  deployDir="/tmp/war-deploy/"
  watchDir="/tmp/war-listen/"
  watchEnabled="false"/>
  

className="org.apache.catalina.cluster.session.ClusterSessionListener"/>

   















  



  




workers2.properties

[logger.apache2]
file="/etc/httpd/conf/logs/error.log"
level=INFO
debug=1

# Config settings
[config]
file=/etc/httpd/conf/workers2.properties
debug=0

# Shared memory file settings
[shm]
file=/etc/httpd/conf/jk2.shm
size=10

# Communcation channel settings for "Tomcat5A"
[channel.socket:localhost:8009]
host=localhost
port=8009
tomcatId=Tomcat5A
group=balanced
lb_factor=1
route=Tomcat5A


# Declare a Tomcat5A worker
[ajp13:localhost:8009]
channel=channel.socket:Tomcat5A


# Communcation channel settings for "Tomcat5B"
[channel.socket:localhost:8010]
host=localhost
port=8010
tomcatId=Tomcat5B
group=balanced
lb_factor=1
route=Tomcat5B


# Declare a Tomcat5B worker
[ajp13:localhost:8010]
channel=channel.socket:Tomcat5B


# Communcation channel settings for "Tomcat5C"
[channel.socket:localhost:8011]
host=localhost
port=8011
tomcatId=Tomcat5C
group=balanced
lb_factor=1
route=Tomcat5C


# Declare a Tomcat5C worker
[ajp13:localhost:8011]
channel=channel.socket:Tomcat5C

# Load balanced Worker
[lb:balanced]
worker=ajp13:localhost:8009
worker=ajp13:localhost:8010
worker=ajp13:localhost:8011
timeout=90
attempts=3
recovery=30
stickySession=0
noWorkerMsg=Server Busy please retry later.
noWorkerCodeMsg=503

# URI mappings for the tomcat worker
# Map the "jsp-examples" web application context to the web server URI
space
[uri:/jsp-examples/*]
info= Mapping for jsp-examples context for tomcat
context=/jsp-examples
group=balanced

[shm]
file=/etc/httpd/conf/jk2.shm
size=100

[uri:/servlets-examples/*]
context=/servlets-examples
group=balanced

# Define a status worker
[status:]

# Status URI mapping
[uri:/jkstatus/*]
group=status


obviously the server.xml files on the other 2 instances of tomcat are
the same except the ports and jvmRoute have been changed.


can anyone see where i am going wrong ?

Thanks



  



--


Filip Hanik

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands

Question about StandardSession and ApplicationContext

2006-06-21 Thread John McClain
I am profiling our application in jprofiler. I have noticed that the deep
size of StandardSession object for each user is VERY large - ~ 11+mb. Yet I
know that we are not adding that much data. Where is all that memory coming
from? Is it truly non static data that is overhead for each session, or is
it static data that each session points to?

Does anyone out there have a strategy for finding memory leaks in a Tomcat
application? I am not finding ours.

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
"Skepticism is the first step toward truth"


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat in-memory session replication

2006-06-21 Thread Sean O'Reilly
Hi,

I am trying to get in-memory session replication working and am testing
running 3 seperate tomcat instances on the same server.

I am using tomcat-5.5.15 and apache-2.0.54 with jk2.

Whenever i run my test app although it should be doing round-robin load
balancing it doesn't switch to another instance of tomcat until the
eighth request and does not appear to have sent the session information
across as the session ID changes.

Here are my server.xml and workers2.properties files

server.xml



  
  
  
  
  

  
  







  

  

  
  





















 
 
 


  
  

  

  
  

  
  

  

  

  

  

  
  

 












   

  


   














  



  




workers2.properties

[logger.apache2]
file="/etc/httpd/conf/logs/error.log"
level=INFO
debug=1

# Config settings
[config]
file=/etc/httpd/conf/workers2.properties
debug=0

# Shared memory file settings
[shm]
file=/etc/httpd/conf/jk2.shm
size=10

# Communcation channel settings for "Tomcat5A"
[channel.socket:localhost:8009]
host=localhost
port=8009
tomcatId=Tomcat5A
group=balanced
lb_factor=1
route=Tomcat5A


# Declare a Tomcat5A worker
[ajp13:localhost:8009]
channel=channel.socket:Tomcat5A


# Communcation channel settings for "Tomcat5B"
[channel.socket:localhost:8010]
host=localhost
port=8010
tomcatId=Tomcat5B
group=balanced
lb_factor=1
route=Tomcat5B


# Declare a Tomcat5B worker
[ajp13:localhost:8010]
channel=channel.socket:Tomcat5B


# Communcation channel settings for "Tomcat5C"
[channel.socket:localhost:8011]
host=localhost
port=8011
tomcatId=Tomcat5C
group=balanced
lb_factor=1
route=Tomcat5C


# Declare a Tomcat5C worker
[ajp13:localhost:8011]
channel=channel.socket:Tomcat5C

# Load balanced Worker
[lb:balanced]
worker=ajp13:localhost:8009
worker=ajp13:localhost:8010
worker=ajp13:localhost:8011
timeout=90
attempts=3
recovery=30
stickySession=0
noWorkerMsg=Server Busy please retry later.
noWorkerCodeMsg=503

# URI mappings for the tomcat worker
# Map the "jsp-examples" web application context to the web server URI
space
[uri:/jsp-examples/*]
info= Mapping for jsp-examples context for tomcat
context=/jsp-examples
group=balanced

[shm]
file=/etc/httpd/conf/jk2.shm
size=100

[uri:/servlets-examples/*]
context=/servlets-examples
group=balanced

# Define a status worker
[status:]

# Status URI mapping
[uri:/jkstatus/*]
group=status


obviously the server.xml files on the other 2 instances of tomcat are
the same except the ports and jvmRoute have been changed.


can anyone see where i am going wrong ?

Thanks



-- 
Sean O'Reilly
Systems Administrator
SECPay Ltd

http://www.secpay.com

[EMAIL PROTECTED]

Mobile 07917 463906

DDI 01732 300212

This email contains information which is confidential. It is for the
exclusive use of the addressee(s). If you are not the addressee, please
note that any distribution, dissemination, copying or use of this
communication or the information in it is prohibited. If you have
received this email in error, please telephone me immediately.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do I set up a default context for a virtual host

2006-06-21 Thread teknokrat

Yeah, I have. If you have a look at the bottom I have a ROOT.xml with




I have tried using just  with no success



Pid wrote:

Read the docs:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Context path attribute: "The value of this field must not be set except
when statically defining a Context in server.xml, as it will be infered
from the filenames used for either the .xml context file or the docBase."





teknokrat wrote:

I trying to setup virtual hosts on tomcat 5.5. and windows.

I have added the following to server.xml


  


I have added context.xml to conf/Catalina/wiki.net containing



Then I have added wiki.war to C:\wiki and restarted tomcat.

Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
resource not available.

I have tried changing the application name to ROOT.war and the
context.xml file to ROOT.xml containing



But this still produces nothing.

How can I set up tomcat so that going to http://wiki.net runs my wiki.war?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf documents

2006-06-21 Thread Pid

Bob Wyatt wrote:
> Pid,
> 
> HREF="C666119.pdf"

OK. The above is a relative path. The client browser (not the webapp) is
looking in the wrong place, because you aren't telling it the correct path.
You really need to try to get your head round the difference between
relative and absolute paths and then, also, file system paths and web URLs.

The PDFs are currently available under the web URL:
 http://myipaddr:8100/pdf/C666119.pdf

which means that the link should refer to href="/pdf/C666119.pdf"
This would be an absolute path.

You can't map the file system path (/big/dir/of/pdfs/) to the same web
URL as the app, because the two can't co-exist in the same place.

> As no file path is in HREF, and pdf.xml is correct (as exhibited by
> http://myipaddr:8100/pdf), should I be changing the path from /pdf to
> /myapp/jsp/app, or are you advocating changing the app so the HREF becomes
> /usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or how
> to do it, but that does not mean it cannot be done.

/usr/lg/unformq/C666119.pdf is a file system path, and therefore not
accessible to the browser/client.  Once again, the webapp is not looking
for, searching for, or accessing the PDF files, it's the
browser/client/user who is.

Who authored the file/page that contains the list of PDFs? The author of
the commercial app, or someone in your organisation?


> Thanks for all of your help!
> 
> Regards,
> 
> Bob 
> 
> 
> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 11:11
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> Bob Wyatt wrote:
>> Pid,
>>
>> I mean that it appears as though the webapp is looking in its own path for
>> the pdf, and not the path of pdf files defined for Tomcat...
> 
> Yes, see below.
> 
>> The webapp true path would be:
>> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
> 
> OK, that's a filing system path.
> 
>> We connect to it by http://myipaddr:8100/myapp
>>
>> The app 'myapp' is a third-party application we purchased...
>>
>> In this case, we have some myapp applications that pull up a fax log of
> all
>> fax transmissions for a user for the past 60 days. We are providing a link
>> in that 'listing' to click to view the fax that was transmitted, which has
>> been saved as a pdf file. As we have 150 users, there are hundreds of
> these
>> pdf files out there, and I do not want them under $CATALINA_HOME. It would
>> appear that we cannot control (specify) the path in which it searches for
>> the pdf files, although Tomcat can when given the proper url
>> (http://myipaddr:8100/pdf).
> 
> (If I'm understanding this correctly it's not searching for anything.)
> 
> The user is clicking the PDF link, and getting a 404, yes?
> If so, do a 'view source' on the HTML page, and tell me what's in the
> href attribute of the link.
> 
> Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
> something else?
> 
>> Can an app supersede the pdf search path, or ignore it entirely? Can this
>> 'feature' be disabled?
> 
> There's no feature I'm afraid. The myapp isn't aware of the PDF context
> you've installed to map the filing system to a URL, so it's ignoring it.
> 
> Either you must configure the app to write the correct URL for each
> PDF*, or you must map the PDF context to the place that is generated by
> the app**.
> 
> *  By altering the HTML to point to the path you defined in pdf.xml.
> ** By altering context pdf.xml definition to create the correct path.
> 
>> Regards,
>>
>> Bob
> 
> P.S.   Just reply to the list mate, I'm getting 2 copies...
> 
> 
> 
> 
> 
>> -Original Message-
>> From: Pid [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, June 21, 2006 09:53
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> np
>>
>> I don't understand why you're or your webapp is looking here:
>>  /myapp/jsp/app/C666119.pdf
>>
>> when the files are available here:
>>  /pdf/C666119.pdf
>>
>> Is the first a filesystem path, or a web URL?
>> When you say "my webapp does not pull it from here", what do you mean by
>>  that?  Sorry if I came to this late, but what does your webapp do and
>> why is it looking there, and not at /pdf/C666119.pdf?
>>
>> Is it just a link that you're clicking or does your webapp download/open
>> the PDF file?
>>
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Pid,
>>>
>>> Thank you very much for this response...
>>>
>>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
>> now
>>> allow http://myipaddr:8100/pdf to display the files in the specified
>>> directory.
>>>
>>> However, my webapp still does not pull it from here; it reports that the
>>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
> there
>>> is a file within the webapp that is over-riding, or over-ruling the
>>> 'default' that is now created?
>>>
>>> Can someone provide any advice on where to look next?
>>>
>>> Can someone provide some advice on what to do if I want to use more than
>>

Re: Tomcat's scalability

2006-06-21 Thread Alex Turner

This discussion focuses primarily on serving static files to a client, not
processing dynamic web pages.  Most people running tomcat are processing
dynamic pages, like getting data from a database and compositing a page
based on that data.

An FTP site, or a static web site will typically be I/O bound or Network
bound, and the only way to increase throughput it to increase the number of
I/Os per second that your server can manage or increase the size of your
network interface.  A java based dynamic website is typically not I/O bound,
but CPU bound, which posses a different set of challenges than a static FTP
server.

Alex.

On 6/21/06, Andrew Miehs <[EMAIL PROTECTED]> wrote:


Now that we are moving to the theoretical discussion, you will
probably want to have a look at

http://www.kegel.com/c10k.html

Regards

Andrew


On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote:

> I spoke recently with guy from Microsoft (project manager from
> server division).
> He said that heavily loaded web server don't lose much time to
> switch processes but when you are out of free memory and server
> start to swap, performances degrade dramatically.
> I though that guy definitely knew what he was thought about.
>
> Lets see what operating system has to do when switch threads.
> Just to move all registers to/from memory? Anything else?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: pdf documents

2006-06-21 Thread Bob Wyatt
Pid,

HREF="C666119.pdf"

As no file path is in HREF, and pdf.xml is correct (as exhibited by
http://myipaddr:8100/pdf), should I be changing the path from /pdf to
/myapp/jsp/app, or are you advocating changing the app so the HREF becomes
/usr/lg/unformq/C666119.pdf? This latter one, I have no idea of where or how
to do it, but that does not mean it cannot be done.

Thanks for all of your help!

Regards,

Bob 


-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 11:11
To: Tomcat Users List
Subject: Re: pdf documents

Bob Wyatt wrote:
> Pid,
> 
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...

Yes, see below.

> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...

OK, that's a filing system path.

> We connect to it by http://myipaddr:8100/myapp
> 
> The app 'myapp' is a third-party application we purchased...
> 
> In this case, we have some myapp applications that pull up a fax log of
all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of
these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).

(If I'm understanding this correctly it's not searching for anything.)

The user is clicking the PDF link, and getting a 404, yes?
If so, do a 'view source' on the HTML page, and tell me what's in the
href attribute of the link.

Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
something else?

> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?

There's no feature I'm afraid. The myapp isn't aware of the PDF context
you've installed to map the filing system to a URL, so it's ignoring it.

Either you must configure the app to write the correct URL for each
PDF*, or you must map the PDF context to the place that is generated by
the app**.

*  By altering the HTML to point to the path you defined in pdf.xml.
** By altering context pdf.xml definition to create the correct path.

> Regards,
> 
> Bob

P.S.   Just reply to the list mate, I'm getting 2 copies...





> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> np
> 
> I don't understand why you're or your webapp is looking here:
>  /myapp/jsp/app/C666119.pdf
> 
> when the files are available here:
>  /pdf/C666119.pdf
> 
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
>  that?  Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
> 
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
> 
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -Original Message-
>> From: Pid [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>  
>>
>
$CATALINA_HOME/conf///pdf.xml
>> Once it's there you have to call the correct URL, which will be
>>  /pdf/.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>>  
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('

Re: what happens with the content.xml file

2006-06-21 Thread Pid
Read the docs:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Context path attribute: "The value of this field must not be set except
when statically defining a Context in server.xml, as it will be *infered
from the filenames* used for either the .xml context file or the docBase."




[EMAIL PROTECTED] wrote:
> Hi folks,
> 
> I'm quiet new to tomcat, but there is already a thing I can't understand:
> 
> I have downloaded the Lambda Probe application version 1.5.0.3. I've got 
> the .war file called probe.war.
> The only thing I did is to rename the file to probe_1.5.0.3.war and 
> deployed it to my tomcat 5.5.17 (I downloaded the tomcat .zip-file and 
> started the startup script - no configuration was changed).
> 
> I put my probe_1.5.0.3.war into the folder $CATALINA_HOME\webapps. What i 
> identified, what was happening now is:
> 
> - The .war file was unpacked to $CATALINA_HOME\webapps\probe_1.5.0.3 with 
> all its content
> - The META-INF/context.xml File (that was in the .war file) is copied to 
> $CATALINA_HOME\conf\Catalina\localhost\probe_1.5.0.3.xml
> - The application is started.
> 
> What I was wondering is, that the URL what my application is listening on 
> is
> http://localhost:8080/probe_1.5.0.3
> 
> Does anyone know what I have to do, that my application listens to the 
> following urls (only one at the time):
> http://localhost:8080/probe or even http://localhost:8080/tom/probe
> 
> As I read the documentation, it should work with setting the path 
> attribute in the context.xml File in the .war file...but i can change that 
> path attribute to what I want, my applications still listens to: 
> http://localhost:8080/probe_1.5.0.3
> 
> Thanks for your help...hope to get an answer soon.
> 
> Kind regards
> Tom
> 
> Please reply to my e-mail adress directly too!

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how do I set up a default context for a virtual host

2006-06-21 Thread Pid
Read the docs:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

Context path attribute: "The value of this field must not be set except
when statically defining a Context in server.xml, as it will be infered
from the filenames used for either the .xml context file or the docBase."





teknokrat wrote:
> I trying to setup virtual hosts on tomcat 5.5. and windows.
> 
> I have added the following to server.xml
> 
> 
>directory="logs"  prefix="wiki_log." suffix=".log"
> timestamp="true"/>
> 
> 
> I have added context.xml to conf/Catalina/wiki.net containing
> 
> 
> 
> Then I have added wiki.war to C:\wiki and restarted tomcat.
> 
> Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces
> resource not available.
> 
> I have tried changing the application name to ROOT.war and the
> context.xml file to ROOT.xml containing
> 
> 
> 
> But this still produces nothing.
> 
> How can I set up tomcat so that going to http://wiki.net runs my wiki.war?
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how do I set up a default context for a virtual host

2006-06-21 Thread teknokrat

I trying to setup virtual hosts on tomcat 5.5. and windows.

I have added the following to server.xml


  


I have added context.xml to conf/Catalina/wiki.net containing



Then I have added wiki.war to C:\wiki and restarted tomcat.

Going to http://wiki.net produces nothing, http:/wiki.net/wiki produces 
resource not available.


I have tried changing the application name to ROOT.war and the 
context.xml file to ROOT.xml containing




But this still produces nothing.

How can I set up tomcat so that going to http://wiki.net runs my wiki.war?


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf documents

2006-06-21 Thread Pid
Bob Wyatt wrote:
> Pid,
> 
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...

Yes, see below.

> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...

OK, that's a filing system path.

> We connect to it by http://myipaddr:8100/myapp
> 
> The app 'myapp' is a third-party application we purchased...
> 
> In this case, we have some myapp applications that pull up a fax log of all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).

(If I'm understanding this correctly it's not searching for anything.)

The user is clicking the PDF link, and getting a 404, yes?
If so, do a 'view source' on the HTML page, and tell me what's in the
href attribute of the link.

Is it href="C666119.pdf" or is it href="/myapp/some/path/C666119.pdf" or
something else?

> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?

There's no feature I'm afraid. The myapp isn't aware of the PDF context
you've installed to map the filing system to a URL, so it's ignoring it.

Either you must configure the app to write the correct URL for each
PDF*, or you must map the PDF context to the place that is generated by
the app**.

*  By altering the HTML to point to the path you defined in pdf.xml.
** By altering context pdf.xml definition to create the correct path.

> Regards,
> 
> Bob

P.S.   Just reply to the list mate, I'm getting 2 copies...





> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> np
> 
> I don't understand why you're or your webapp is looking here:
>  /myapp/jsp/app/C666119.pdf
> 
> when the files are available here:
>  /pdf/C666119.pdf
> 
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
>  that?  Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
> 
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
> 
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Pid,
>>
>> Thank you very much for this response...
>>
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>>
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>>
>> Can someone provide any advice on where to look next?
>>
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>>
>> Regards,
>>
>> Bob
>>
>> -Original Message-
>> From: Pid [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Don't you need to put the context file pdf.xml in a different place?
>>  
>>
> $CATALINA_HOME/conf///pdf.xml
>> Once it's there you have to call the correct URL, which will be
>>  /pdf/.pdf
>>
>>
>>
>>
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>>  
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>>> contextDestroyed()
>>> 2006-06-20 19:24:58 StandardContext[/servlets-ex

Re: Tomcat's scalability

2006-06-21 Thread Andrew Miehs
Now that we are moving to the theoretical discussion, you will  
probably want to have a look at


http://www.kegel.com/c10k.html

Regards

Andrew


On 21/06/2006, at 4:56 PM, Mladen Adamovic wrote:

I spoke recently with guy from Microsoft (project manager from  
server division).
He said that heavily loaded web server don't lose much time to  
switch processes but when you are out of free memory and server  
start to swap, performances degrade dramatically.

I though that guy definitely knew what he was thought about.

Lets see what operating system has to do when switch threads.
Just to move all registers to/from memory? Anything else?



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-21 Thread Martin Gainty
Rick--

2 options
go commercial and buy a monitor app that will display all the CPU, Thread, 
Memory, I/O metrics
http://manageengine.adventnet.com/products/applications_manager/monitor-tomcat.html

-OR-
I found by hand tuning the startup.sh or startup.bat files I could fine tune 
the number of invocations /processed launched/threads invoked
when the bootstrap.jar and the processor engine starts up--

HTH,
M-

*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Rick Cockerham" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, June 21, 2006 10:33 AM
Subject: Re: Tomcat java processes eat processor.


> 
> This looks perfect.  It's what I need.  However...
> I've been all over the website below.  I don't see how to install this 
> through web.xml.  I see how to extend a servlet.  I'm using JSP.  So, 
> that's a little more difficult.
> 
> Thanks,
> Rick
> 
> Leon Rosenberg wrote:
>> look at this:
>>
>> http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers
>>
>> RequestURIFilter is probably what you want
>>
>> you can install this monitoring application by simply adding a filter
>> entry to your web.xml. This way you'll see which requests are
>> currently executed and which uris lasting how long. It might give you
>> a hint what's hanging.
>>
>> Leon
>>
>> On 6/20/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>>
>>> Not sure what you mean.  I can recompile and deploy the code with no
>>> problems.  So, probably...
>>>
>>>
>>>
>>> Leon Rosenberg wrote:
>>> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>> >>
>>> >> I wish it would give me a stack trace.  That would be wonderful.  The
>>> >> part I left out was just a list of all the loaded libraries.
>>> >>
>>> >> I can't risk a switch in software.  I realize this is a tough one.  I
>>> >> have very little flexibility to help me debug.  That's why I'm asking
>>> >> you guys!
>>> >
>>> > Are you allowed to add a new filter?
>>> > If yes I have a solution for you :-)
>>> >
>>> >>
>>> >> Thanks,
>>> >> Rick
>>> >>
>>> >>
>>> >>
>>> >> Leon Rosenberg wrote:
>>> >> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>> >> >>
>>> >> >> OK.  I finally got a file dumped out from this kill.  But, it 
>>> doesn't
>>> >> >> look interesting to me.  Any idea what this means to me?
>>> >> >>
>>> >> >> Any other debug ideas?
>>> >> >
>>> >> > a) paste complete stack trace
>>> >> > b) try a regular vm (suns for example)
>>> >> >
>>> >> > regards
>>> >> > Leon
>>> >> >>
>>> >> >> Thanks,
>>> >> >> Rick
>>> >> >>
>>> >> >> Unexpected Signal : 3 occurred at PC=0x45C6D876
>>> >> >> Function=(null)+0x45C6D876
>>> >> >> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>>> >> >>
>>> >> >> NOTE: We are unable to locate the function name symbol for the 
>>> error
>>> >> >>   just occurred. Please refer to release documentation for
>>> >> possible
>>> >> >>   reason and solutions.
>>> >> >>
>>> >> >> Dynamic libraries:
>>> >> >> 08048000-08057000 r-xp  08:03 815431
>>> >> >> /opt/blackdown-jdk-1.4.2.01/bin/java
>>> >> >> ...
>>> >> >> ...etc.
>>> >> >>
>>> >> >> Heap at VM Abort:
>>> >> >> Heap
>>> >> >>  PSYoungGen  total 102400K, used 84863K [0x4a17, 
>>> 0x5377,
>>> >> >> 0x5377)
>>> >> >>   eden [0x4a17,0x4d1702f8,0x4d37)
>>> >> >>   from [0x4d37,0x4f64fc38,0x5057)
>>> >> >>   to   [0x5057,0x5057,0x5377)
>>> >> >>  PSOldGentotal 256000K, used 215274K [0x5377, 
>>> 0x6317,
>>> >> >> 0x6317)
>>> >> >>   object [0x5377,0x609aa8c0,0x6317)
>>> >> >>  PSPermGen   total 16384K, used 16250K [0x6317, 
>>> 0x6417,
>>> >> >> 0x6717)
>>> >> >>   object [0x6317,0x6414e9f0,0x6417)
>>> >> >>
>>> >> >> Local Time = Mon Jun 19 09:27:56 2006
>>> >> >>
>>> >> >>
>>> >> >> Peter Crowther wrote:
>>> >> >> >> From: Rick Cockerham [mailto:[EMAIL PROTECTED]
>>> >> >> >> Didn't work.  -3 doesn't kill it.
>>> >> >> >>
>>> >> >> >
>>> >> >> > No.  It produces a thread dump, and the process carries on 
>>> going.
>>> >> >> Given
>>> >> >> > that you were complaining about not wanting to restart Tomcat 
>>> twice
>>> >> >> > daily, I thought you'd appreciate a non-fatal solution :-).
>>> >> >> >
>>> >> >> >   - Peter
>>> >> >> >
>>> >> >> >
>>> >> -
>>> >> >> > To start a new topic, e-mail: users@tomcat.apache.org
>>> >> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> >> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >> >> >
>>> >>

Re: Tomcat's scalability

2006-06-21 Thread Mladen Adamovic

Alex Turner wrote:
Please also note that having a max threads of 750 is pretty much 
gaurtenteed

to cause your system to grind to a halt under high load.  (Most linux
systems I've seen buckle somewhere around a load average of 75 or so, 
which

means 75 threads waiting for CPU time).
You mean 75 Java threads waiting for CPU time, because you can have 75 
sleepy and not much CPU consuming processes.

Example from my home computer  :
[EMAIL PROTECTED] ~]$ ps -ely | nl | tail -n 1
  105  S   500  4586  4508  0  76   0  540  1008 pipe_w pts/2
00:00:00 tail

[EMAIL PROTECTED] ~]$

It means 105 processes in memory and I think is not unusual at all.


but doing much more than 3 or 4 times the number of
CPUs you have is only going to cause your system to spend more time in
context switches, not in actual work time.
I spoke recently with guy from Microsoft (project manager from server 
division).
He said that heavily loaded web server don't lose much time to switch 
processes but when you are out of free memory and server start to swap, 
performances degrade dramatically.

I though that guy definitely knew what he was thought about.

Lets see what operating system has to do when switch threads.
Just to move all registers to/from memory? Anything else?

A number less than 32 is probably more than your system will ever be 
able to

cope with if you are actualy doing any processing during the course of a
request and not just serving static content.  

I believe that is true. Probably you got that number experimental.


It's usefull to do 30 seconds of googling to find Suns actual statement
prior to posting and demostrating that 'AFAIK' is pretty lame, because 
you

didn't bother to take the time to actualy find out.
Actually, I tried to find those information once and searched something 
like:

"java windows multi thread" and I cannot see it clearly in first entries.
Probably I was supposed to refine my search...


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat creating two threads for one request

2006-06-21 Thread ametsi

If I am not mistaken jakarta-tomcat-5.0.28
--
View this message in context: 
http://www.nabble.com/Tomcat-creating-two-threads-for-one-request-t1743271.html#a4975580
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat's scalability

2006-06-21 Thread Mladen Adamovic

Please see
http://java.sun.com/developer/technicalArticles/Programming/linux/
Java on linux has been natively multithreaded since 1.3

Uops,
I haven't known.
Thank you all for your information (to Alex Turner, Leon Rosenberg, 
Darryl Milles).

I was mistaken about this.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat java processes eat processor.

2006-06-21 Thread Rick Cockerham


This looks perfect.  It's what I need.  However...
I've been all over the website below.  I don't see how to install this 
through web.xml.  I see how to extend a servlet.  I'm using JSP.  So, 
that's a little more difficult.


Thanks,
Rick

Leon Rosenberg wrote:

look at this:

http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers

RequestURIFilter is probably what you want

you can install this monitoring application by simply adding a filter
entry to your web.xml. This way you'll see which requests are
currently executed and which uris lasting how long. It might give you
a hint what's hanging.

Leon

On 6/20/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:


Not sure what you mean.  I can recompile and deploy the code with no
problems.  So, probably...



Leon Rosenberg wrote:
> On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>>
>> I wish it would give me a stack trace.  That would be wonderful.  The
>> part I left out was just a list of all the loaded libraries.
>>
>> I can't risk a switch in software.  I realize this is a tough one.  I
>> have very little flexibility to help me debug.  That's why I'm asking
>> you guys!
>
> Are you allowed to add a new filter?
> If yes I have a solution for you :-)
>
>>
>> Thanks,
>> Rick
>>
>>
>>
>> Leon Rosenberg wrote:
>> > On 6/19/06, Rick Cockerham <[EMAIL PROTECTED]> wrote:
>> >>
>> >> OK.  I finally got a file dumped out from this kill.  But, it 
doesn't

>> >> look interesting to me.  Any idea what this means to me?
>> >>
>> >> Any other debug ideas?
>> >
>> > a) paste complete stack trace
>> > b) try a regular vm (suns for example)
>> >
>> > regards
>> > Leon
>> >>
>> >> Thanks,
>> >> Rick
>> >>
>> >> Unexpected Signal : 3 occurred at PC=0x45C6D876
>> >> Function=(null)+0x45C6D876
>> >> Library=/opt/blackdown-jdk-1.4.2.01/jre/lib/i386/server/libjvm.so
>> >>
>> >> NOTE: We are unable to locate the function name symbol for the 
error

>> >>   just occurred. Please refer to release documentation for
>> possible
>> >>   reason and solutions.
>> >>
>> >> Dynamic libraries:
>> >> 08048000-08057000 r-xp  08:03 815431
>> >> /opt/blackdown-jdk-1.4.2.01/bin/java
>> >> ...
>> >> ...etc.
>> >>
>> >> Heap at VM Abort:
>> >> Heap
>> >>  PSYoungGen  total 102400K, used 84863K [0x4a17, 
0x5377,

>> >> 0x5377)
>> >>   eden [0x4a17,0x4d1702f8,0x4d37)
>> >>   from [0x4d37,0x4f64fc38,0x5057)
>> >>   to   [0x5057,0x5057,0x5377)
>> >>  PSOldGentotal 256000K, used 215274K [0x5377, 
0x6317,

>> >> 0x6317)
>> >>   object [0x5377,0x609aa8c0,0x6317)
>> >>  PSPermGen   total 16384K, used 16250K [0x6317, 
0x6417,

>> >> 0x6717)
>> >>   object [0x6317,0x6414e9f0,0x6417)
>> >>
>> >> Local Time = Mon Jun 19 09:27:56 2006
>> >>
>> >>
>> >> Peter Crowther wrote:
>> >> >> From: Rick Cockerham [mailto:[EMAIL PROTECTED]
>> >> >> Didn't work.  -3 doesn't kill it.
>> >> >>
>> >> >
>> >> > No.  It produces a thread dump, and the process carries on 
going.

>> >> Given
>> >> > that you were complaining about not wanting to restart Tomcat 
twice

>> >> > daily, I thought you'd appreciate a non-fatal solution :-).
>> >> >
>> >> >   - Peter
>> >> >
>> >> >
>> -
>> >> > To start a new topic, e-mail: users@tomcat.apache.org
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >>
>> >> --
>> >>
>> >> Rick Cockerham
>> >> Pocket Knife Software, Inc.
>> >> http://www.pocketknifesoftware.com
>> >> 512-249-0467
>> >>
>> >>
>> >> 
-

>> >> To start a new topic, e-mail: users@tomcat.apache.org
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > 
-

>> > To start a new topic, e-mail: users@tomcat.apache.org
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>> --
>>
>> Rick Cockerham
>> Pocket Knife Software, Inc.
>> http://www.pocketknifesoftware.com
>> 512-249-0467
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--

Rick Cockerham
Pocket Knife Software, Inc.
http://www.pocketknifesoftware.com
512-249-0467


-
To start a new topic, e-mail: users@tomcat.ap

RE: pdf documents

2006-06-21 Thread Bob Wyatt
Martin,

Thank you for the reply...

I have no idea where to make the suggested changes...
I am really, really new to this and have zero experience with this...

If someone has the patience to help me, I would appreciate it!

Regards,

Bob

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 10:22
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: pdf documents

Hi Bob-
in your Tomcat servlet code you can read the file directly 
in this example I am reading fubar.properties from folder /fu/bar
BufferedReader reader = new BufferedReader(new
FileReader("/fu/bar/fubar.properties"));
(If not you will have to supply URI such as
http://server:port/WebAppName/RelativePathToFile/filename)
Hope this helps,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Bob Wyatt" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" ; <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2006 10:15 AM
Subject: RE: pdf documents


> Pid,
> 
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
> 
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
> 
> We connect to it by http://myipaddr:8100/myapp
> 
> The app 'myapp' is a third-party application we purchased...
> 
> In this case, we have some myapp applications that pull up a fax log of
all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of
these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
> 
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> np
> 
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
> 
> when the files are available here:
> /pdf/C666119.pdf
> 
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that?  Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
> 
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
> 
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Pid,
>> 
>> Thank you very much for this response...
>> 
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>> 
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing
there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>> 
>> Can someone provide any advice on where to look next?
>> 
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>> 
>> Regards,
>> 
>> Bob
>> 
>> -Original Message-
>> From: Pid [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>> 
>> Don't you need to put the context file pdf.xml in a different place?
>>  
>>
>
$CATALINA_HOME/conf///pdf.xml
>> 
>> Once it's there you have to call the correct URL, which will be
>>  /pdf/.pdf
>> 
>> 
>> 
>> 
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not
available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>>  
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a1

what happens with the content.xml file

2006-06-21 Thread thomas . stettler
Hi folks,

I'm quiet new to tomcat, but there is already a thing I can't understand:

I have downloaded the Lambda Probe application version 1.5.0.3. I've got 
the .war file called probe.war.
The only thing I did is to rename the file to probe_1.5.0.3.war and 
deployed it to my tomcat 5.5.17 (I downloaded the tomcat .zip-file and 
started the startup script - no configuration was changed).

I put my probe_1.5.0.3.war into the folder $CATALINA_HOME\webapps. What i 
identified, what was happening now is:

- The .war file was unpacked to $CATALINA_HOME\webapps\probe_1.5.0.3 with 
all its content
- The META-INF/context.xml File (that was in the .war file) is copied to 
$CATALINA_HOME\conf\Catalina\localhost\probe_1.5.0.3.xml
- The application is started.

What I was wondering is, that the URL what my application is listening on 
is
http://localhost:8080/probe_1.5.0.3

Does anyone know what I have to do, that my application listens to the 
following urls (only one at the time):
http://localhost:8080/probe or even http://localhost:8080/tom/probe

As I read the documentation, it should work with setting the path 
attribute in the context.xml File in the .war file...but i can change that 
path attribute to what I want, my applications still listens to: 
http://localhost:8080/probe_1.5.0.3

Thanks for your help...hope to get an answer soon.

Kind regards
Tom

Please reply to my e-mail adress directly too!

Re: pdf documents

2006-06-21 Thread Martin Gainty
Hi Bob-
in your Tomcat servlet code you can read the file directly 
in this example I am reading fubar.properties from folder /fu/bar
BufferedReader reader = new BufferedReader(new 
FileReader("/fu/bar/fubar.properties"));
(If not you will have to supply URI such as 
http://server:port/WebAppName/RelativePathToFile/filename)
Hope this helps,
Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Bob Wyatt" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" ; <[EMAIL PROTECTED]>
Sent: Wednesday, June 21, 2006 10:15 AM
Subject: RE: pdf documents


> Pid,
> 
> I mean that it appears as though the webapp is looking in its own path for
> the pdf, and not the path of pdf files defined for Tomcat...
> 
> The webapp true path would be:
> $CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...
> 
> We connect to it by http://myipaddr:8100/myapp
> 
> The app 'myapp' is a third-party application we purchased...
> 
> In this case, we have some myapp applications that pull up a fax log of all
> fax transmissions for a user for the past 60 days. We are providing a link
> in that 'listing' to click to view the fax that was transmitted, which has
> been saved as a pdf file. As we have 150 users, there are hundreds of these
> pdf files out there, and I do not want them under $CATALINA_HOME. It would
> appear that we cannot control (specify) the path in which it searches for
> the pdf files, although Tomcat can when given the proper url
> (http://myipaddr:8100/pdf).
> 
> Can an app supersede the pdf search path, or ignore it entirely? Can this
> 'feature' be disabled?
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 09:53
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> np
> 
> I don't understand why you're or your webapp is looking here:
> /myapp/jsp/app/C666119.pdf
> 
> when the files are available here:
> /pdf/C666119.pdf
> 
> Is the first a filesystem path, or a web URL?
> When you say "my webapp does not pull it from here", what do you mean by
> that?  Sorry if I came to this late, but what does your webapp do and
> why is it looking there, and not at /pdf/C666119.pdf?
> 
> Is it just a link that you're clicking or does your webapp download/open
> the PDF file?
> 
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Pid,
>> 
>> Thank you very much for this response...
>> 
>> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
> now
>> allow http://myipaddr:8100/pdf to display the files in the specified
>> directory.
>> 
>> However, my webapp still does not pull it from here; it reports that the
>> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
>> is a file within the webapp that is over-riding, or over-ruling the
>> 'default' that is now created?
>> 
>> Can someone provide any advice on where to look next?
>> 
>> Can someone provide some advice on what to do if I want to use more than
> one
>> pdf directory, where the second directory is not a subdirectory of the
>> first?
>> 
>> Regards,
>> 
>> Bob
>> 
>> -Original Message-
>> From: Pid [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, June 21, 2006 05:04
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>> 
>> Don't you need to put the context file pdf.xml in a different place?
>>  
>>
> $CATALINA_HOME/conf///pdf.xml
>> 
>> Once it's there you have to call the correct URL, which will be
>>  /pdf/.pdf
>> 
>> 
>> 
>> 
>> Bob Wyatt wrote:
>>> Mark,
>>>
>>> I appreciate all of your help and energy on my behalf...
>>>
>>> But alas, this does not work for me...
>>>
>>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>>
>>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
> modified
>>> $CATALINA_HOME/webapps/pdf.xml to read:
>>> # more pdf.xml
>>>  
>>>
>>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>>
>>> The log file does not report any errors; the last entries are from the
>>> shutdown and restart of tomcat...
>>>
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@38a11b3b')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@66cb5b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>>> va.lang.String;@1495b3c')
>>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionLis

Persistent Sessions and custom path attribute

2006-06-21 Thread super_drone
Hi All
I'm trying to implement persistent sessions in Tomcat so a 
shutdown/startup sequence doesn't force me to login again. I've 
created context.xml in META-INF directory with following content:







There are two questions:
1. Shutdown/Startup still forces me to login again :( Whats wrong?
2. A 'path' attribute of jsf-test1 in above would imply I can 
access the web app using 'http://localhost:8080/jsf-test1' ? 
However this URL gives an error saying 'not available'. Did I 
understand the purpose of 'path' attribute wrong?
BTW, the web app is installed in webapps/jsf-test  directory.

This is Tomcat 5.5.17 on Linux.

Thanks




Concerned about your privacy? Instantly send FREE secure email, no account 
required
http://www.hushmail.com/send?l=480

Get the best prices on SSL certificates from Hushmail
https://www.hushssl.com?l=485


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: pdf documents

2006-06-21 Thread Bob Wyatt
Pid,

I mean that it appears as though the webapp is looking in its own path for
the pdf, and not the path of pdf files defined for Tomcat...

The webapp true path would be:
$CATALINA_HOME/webapps/myapp/jsp/app/C666119.pdf...

We connect to it by http://myipaddr:8100/myapp

The app 'myapp' is a third-party application we purchased...

In this case, we have some myapp applications that pull up a fax log of all
fax transmissions for a user for the past 60 days. We are providing a link
in that 'listing' to click to view the fax that was transmitted, which has
been saved as a pdf file. As we have 150 users, there are hundreds of these
pdf files out there, and I do not want them under $CATALINA_HOME. It would
appear that we cannot control (specify) the path in which it searches for
the pdf files, although Tomcat can when given the proper url
(http://myipaddr:8100/pdf).

Can an app supersede the pdf search path, or ignore it entirely? Can this
'feature' be disabled?

Regards,

Bob

-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 09:53
To: Tomcat Users List
Subject: Re: pdf documents

np

I don't understand why you're or your webapp is looking here:
 /myapp/jsp/app/C666119.pdf

when the files are available here:
 /pdf/C666119.pdf

Is the first a filesystem path, or a web URL?
When you say "my webapp does not pull it from here", what do you mean by
 that?  Sorry if I came to this late, but what does your webapp do and
why is it looking there, and not at /pdf/C666119.pdf?

Is it just a link that you're clicking or does your webapp download/open
the PDF file?





Bob Wyatt wrote:
> Pid,
> 
> Thank you very much for this response...
> 
> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does
now
> allow http://myipaddr:8100/pdf to display the files in the specified
> directory.
> 
> However, my webapp still does not pull it from here; it reports that the
> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
> is a file within the webapp that is over-riding, or over-ruling the
> 'default' that is now created?
> 
> Can someone provide any advice on where to look next?
> 
> Can someone provide some advice on what to do if I want to use more than
one
> pdf directory, where the second directory is not a subdirectory of the
> first?
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 05:04
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> Don't you need to put the context file pdf.xml in a different place?
>  
>
$CATALINA_HOME/conf///pdf.xml
> 
> Once it's there you have to call the correct URL, which will be
>  /pdf/.pdf
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Mark,
>>
>> I appreciate all of your help and energy on my behalf...
>>
>> But alas, this does not work for me...
>>
>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>
>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I
modified
>> $CATALINA_HOME/webapps/pdf.xml to read:
>> # more pdf.xml
>>  
>>
>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>
>> The log file does not report any errors; the last entries are from the
>> shutdown and restart of tomcat...
>>
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@38a11b3b')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@66cb5b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@1495b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@195f9b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@4745b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@345db3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:25:39
>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
> init():
>> ruleChain: [org.apache.webapp.balan
>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
> Target
>> string: News / Redirect URL: http://www.cnn.com], [org.a
>> pache.webapp.balancer.rules.RequestParameter

Re: pdf documents

2006-06-21 Thread Pid
np

I don't understand why you're or your webapp is looking here:
 /myapp/jsp/app/C666119.pdf

when the files are available here:
 /pdf/C666119.pdf

Is the first a filesystem path, or a web URL?
When you say "my webapp does not pull it from here", what do you mean by
 that?  Sorry if I came to this late, but what does your webapp do and
why is it looking there, and not at /pdf/C666119.pdf?

Is it just a link that you're clicking or does your webapp download/open
the PDF file?





Bob Wyatt wrote:
> Pid,
> 
> Thank you very much for this response...
> 
> Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now
> allow http://myipaddr:8100/pdf to display the files in the specified
> directory.
> 
> However, my webapp still does not pull it from here; it reports that the
> resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
> is a file within the webapp that is over-riding, or over-ruling the
> 'default' that is now created?
> 
> Can someone provide any advice on where to look next?
> 
> Can someone provide some advice on what to do if I want to use more than one
> pdf directory, where the second directory is not a subdirectory of the
> first?
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Pid [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 21, 2006 05:04
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> Don't you need to put the context file pdf.xml in a different place?
>  
> $CATALINA_HOME/conf///pdf.xml
> 
> Once it's there you have to call the correct URL, which will be
>  /pdf/.pdf
> 
> 
> 
> 
> Bob Wyatt wrote:
>> Mark,
>>
>> I appreciate all of your help and energy on my behalf...
>>
>> But alas, this does not work for me...
>>
>> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
>>
>> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
>> $CATALINA_HOME/webapps/pdf.xml to read:
>> # more pdf.xml
>>  
>>
>> The test to http://myip:8100/pdf also fails with resource unavailable...
>>
>> The log file does not report any errors; the last entries are from the
>> shutdown and restart of tomcat...
>>
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@38a11b3b')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@66cb5b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
>> va.lang.String;@1495b3c')
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@195f9b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@4745b3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
>> ng.String;@345db3d')
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
>> contextDestroyed()
>> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
>> contextDestroyed()
>> 2006-06-20 19:25:39
>> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
> init():
>> ruleChain: [org.apache.webapp.balan
>> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
> Target
>> string: News / Redirect URL: http://www.cnn.com], [org.a
>> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
>> paramName / Target param value: paramValue / Redirect URL: http
>> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
>> Redirect URL: http://jakarta.apache.org]]
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
>> contextInitialized()
>> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
>> contextInitialized()
>>
>> Regards,
>>
>> Bob
>>
>> -Original Message-
>> From: Mark Thomas [mailto:[EMAIL PROTECTED] 
>> Sent: Tuesday, June 20, 2006 19:14
>> To: Tomcat Users List
>> Subject: Re: pdf documents
>>
>> Bob Wyatt wrote:
>>>  
>> Sorry, I should have read you post more carefully. The above works for
>> 5.5.x but for 5.0.x you will need
>>  
>>
>> On this version directory listings are enabled so http://host:port/pdf
>> should return a directory listing.
>>
>>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
>> 

Re: Tomcat 5.5.17 APR/SSL Client Certificat

2006-06-21 Thread alym

thanks for your reponse

But i find the trouble , tomcat 5.5.17 with tomcat-native-1.1.3 and
APR-1.2.7 work well with only
openssl-0.9.7 series not with openssl-0.9.8 series.

regards,
Jean-Michel
--
View this message in context: 
http://www.nabble.com/Tomcat-5.5.17-APR-SSL-Client-Certificat-t1810149.html#a4974402
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread CMSuser


Leon Rosenberg-3 wrote:
> 
> I ment rather how do you handle the upload in tomcat?
> 
I have not written any custom "upload handlers" on the web server side. I
just give the appropriate url to the "put client" and it's done.



--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4974353
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread CMSuser


Leon Rosenberg-3 wrote:
> 
> I ment rather how do you handle the upload in tomcat?
> 

I have written any custom "upload handlers". I just give the appropriate url
to the "put client"  and it's done.

--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4974321
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: pdf documents

2006-06-21 Thread Bob Wyatt
Mark,

Pid posted a solution that works for me in the testing, but not in my app...


I am posting the server.xml to comply with your request, but I am fairly
certain that the file was not edited or altered when the app was installed.
The app is third-party...

So my questions now delve on how to make the app honor the pdf pathing
defined...









  
  
  
  

  
  








  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  


  

  

  
  


























  
  

  
  

  

  
  

  
  

  

  

  

  

  
  

















  



  


#

Regards,

Bob

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 20, 2006 22:30
To: Tomcat Users List
Subject: Re: pdf documents

Bob Wyatt wrote:
> Mark,
> 
> I appreciate all of your help and energy on my behalf...
> 
> But alas, this does not work for me...

Hmmm. Can you post your server.xml (with any passwords etc blanked out).

Thanks,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread Leon Rosenberg

I ment rather how do you handle the upload in tomcat?


On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote:


FYI-
 I've been using the curl command line client for the uploads and downloads.

When I tried the commons HttpClient from a java program, the upload/download
throughputs matched !! (at over 85% ).

regards,
Aman.

--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: pdf documents

2006-06-21 Thread Bob Wyatt
Pid,

Thank you very much for this response...

Placing the pdf.xml file in $CATALINA_HOME/conf/Catalina/localhost does now
allow http://myipaddr:8100/pdf to display the files in the specified
directory.

However, my webapp still does not pull it from here; it reports that the
resource /myapp/jsp/app/C666119.pdf is unavailable. So I am guessing there
is a file within the webapp that is over-riding, or over-ruling the
'default' that is now created?

Can someone provide any advice on where to look next?

Can someone provide some advice on what to do if I want to use more than one
pdf directory, where the second directory is not a subdirectory of the
first?

Regards,

Bob

-Original Message-
From: Pid [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 05:04
To: Tomcat Users List
Subject: Re: pdf documents

Don't you need to put the context file pdf.xml in a different place?
 
$CATALINA_HOME/conf///pdf.xml

Once it's there you have to call the correct URL, which will be
 /pdf/.pdf




Bob Wyatt wrote:
> Mark,
> 
> I appreciate all of your help and energy on my behalf...
> 
> But alas, this does not work for me...
> 
> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
> 
> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
> $CATALINA_HOME/webapps/pdf.xml to read:
> # more pdf.xml
>  
> 
> The test to http://myip:8100/pdf also fails with resource unavailable...
> 
> The log file does not report any errors; the last entries are from the
> shutdown and restart of tomcat...
> 
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@38a11b3b')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@66cb5b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@1495b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@195f9b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@4745b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@345db3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:25:39
> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter:
init():
> ruleChain: [org.apache.webapp.balan
> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule:
Target
> string: News / Redirect URL: http://www.cnn.com], [org.a
> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
> paramName / Target param value: paramValue / Redirect URL: http
> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> Redirect URL: http://jakarta.apache.org]]
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
> contextInitialized()
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Mark Thomas [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 20, 2006 19:14
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> Bob Wyatt wrote:
>>   
> 
> Sorry, I should have read you post more carefully. The above works for
> 5.5.x but for 5.0.x you will need
>  
> 
> On this version directory listings are enabled so http://host:port/pdf
> should return a directory listing.
> 
>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
> shutdown
>> and restarted Tomcat, and I receive the same error message.
> 
> I don't think this would ever work. I'd delete this copy of pdf.xml so
> it doesn't cause confusion down the road.
> 
> If, after a restart, this still doesn't work have a look in
> $CATALINA_HOME/logs and post the relevant sections of the logs.
> 
> Mark
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To sta

multiple tomcat services

2006-06-21 Thread Bharathi Kattamuri

Hi,


I have installed multiple tomcat instances with apche server and  mod_jk 
connector, in windows environment.


I have problem in configuring the tomcats as separate services.  Could  
anyone suggest me how to install these tomcats as services.


Any help is appreciated.

with regards,
Bharathi


  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat creating two threads for one request

2006-06-21 Thread Darryl Miles

ametsi wrote:

Tomcat Version: 5.0


Can you get a more precise version ?  5.0.0 ? 5.0.99 ?


Darryl

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



IIS and Tomcat authentication problems

2006-06-21 Thread Markus Müller
Hi listers,

I want to use IIS with Tomcat using the the NTLM-detected user name. The
integration of IIS and Tomcat works fine, but not the authentication. I
managed this for a number of Tomcat versions before, but right know I
cannot get it to work.
Im am using:
Tomcat 5.5.12
IIS V6.0
Windows Server 2003

I added tomcatAuthenticatin="false" to my AJP 1.3 connector that resides
von port 8012 (server.xml attached), but the user name simple does not get
true.
Anybody any ideas?

cheers

Markus


-- 
Dr. Markus Müller
l a t / l o n  GmbH (Hamburg)
Gluckstr. 53a   22081 Hamburg, Germany
phone ++49 +177 2470742 fax ++49 +228 18496-29
http://www.lat-lon.de   http://www.deegree.org








  
  
  
  
  

  
  







  

  

  
  






	
	














 
 



  
  

  

  
  

  
  

  

  

  

  

  
  

 















  



  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Tomcat creating two threads for one request

2006-06-21 Thread ametsi

ok lets take one thing at a time... I am not an expert on this

Running the application locally using IntelliJ and tomcat:
java -version: "1.3.1_01"
Tomcat Version: 5.0

While running on the server:
Sun(TM) ONE Application Server 7
java version "1.4.1_06"

Keep in mind that It does not happen all the times 

--
View this message in context: 
http://www.nabble.com/Tomcat-creating-two-threads-for-one-request-t1743271.html#a4973139
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Mod_jk/firewall configuration problems

2006-06-21 Thread Jess Holle

Did you check your OS's keep alive interval and modify it if necessary?

This interval has to be more frequent than your firewall's idle 
connection termination timeout -- otherwise setting keepalive in mod_jk 
does nothing for you.


[This is alluded to in the docs.  The details on setting this interval 
vary between OS'es.]


--
Jess Holle

Serlet Jean-Claude wrote:

Sorry : that 's all i thought
Hope that you don't forget to stop and restart your Apache server after
modifying workers.properties
 
 

Jean-Claude 

 



  _  

De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 21 juin 2006 13:37

À : Serlet Jean-Claude; users@tomcat.apache.org
Objet : RE: Mod_jk/firewall configuration problems



I didn't have socket_keepalive set.  But I added it and still have the same
problem.

 


>From my httpd.conf:

 


JkLogFile /var/log/httpd/mod_jk.log

JkLogLevel debug

 


# Just like workers.properties but exact line is prefixed

# with JkWorkerProperty

 


# Minimal jk configuration

JkWorkerProperty worker.list=ajp13w

JkWorkerProperty worker.ajp13w.type=ajp13

JkWorkerProperty worker.ajp13w.host=localhost

JkWorkerProperty worker.ajp13w.port=8009   

JkWorkerProperty worker.ajp13w.socket_keepalive=1   

 


# enter the full path to the tomcat webapps directory

JkAutoAlias /opt/tomcat/webapps

 


# Mount 'testapp' directory. It's physical location

# is assumed to be in the /opt/tomcat/webapps/testapp

# ajp13w is a worker defined in the workers.properties

JkMount /testapp/* ajp13w

 


# Unmount desired static content from testapp webapp.

# This content will be served by the httpd directly.

JkUnMount /testapp/images/*.gif ajp13w

JkUnMount /testapp/images/*.jpg ajp13w

 


-- Greg

 

 

 

 



  _  



From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:35 AM

To: Greg Allen; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems

 


Please give the configuration of your workers : the workers.properties.file

Have you set worker.yourworker.socket_keepalive=1 in it ?

 

Jean-Claude 

 

 



  _  



De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 20 juin 2006 16:42

À : users@tomcat.apache.org
Objet : Mod_jk/firewall configuration problems

I am having a problem with mod_jk.so. I have apache set up as my web server,
forwarding my jsp
traffic to a tomcat server running on the same machine.

 


This setup works fine when the client is inside of my firewall. However,
when I try to access

my site from outside the firewall, mod_jk does not forward the traffic to
tomcat and the page
is not displayed.

 


My firewall is set up to forward port 80 traffic from outside to my web
server machine. This
is working, as I can get non-tomcat served pages to appear on clients
outside of the firewall.

 


I have attached the debugging log from mod_jk. In it you can see two
requests - the first is 
from outside (which fails), while the second is from inside and you can see

that it is served
correctly.

 

I'm sure this is some sort of configuration issue.  But I don't know what.  

 


Can anyone point out what is wrong?

 


Thanks,

 


-- Greg

 



  


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mod_jk/firewall configuration problems

2006-06-21 Thread Greg Allen
The server.xml is attached.

I access it from inside via "http://dilbert/testapp";.  The
hostname is resolved in my /etc/hosts file.  From outside
the firewall, I access it via IP.  The router is configured 
to forward port 80 traffic to the web server (by IP address).

-- Greg



-Original Message-
From:   Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED]
Sent:   Wed 6/21/2006 7:41 AM
To: 'Tomcat Users List'
Cc: 
Subject:RE: Mod_jk/firewall configuration problems
Can you send me how you are accessing the website from within the firewall
and how you are accessing the same outside the firewall ?

Can you also send me the server.xml 


Regards
Guru 

Gurumoorthy Raghupathy
Web Support - Fidelity Investments International
* Tel: +44 1737 836798
* Internal: 8-724 6798
* Tel (R): +442086610646
* Tel (R): +447899033459
* Tel (S): +447736059647 
* Mail-Zone : XTW2A
* E-Mail: <>

Important: Fidelity Investments International, Fidelity Investment Services
Limited, Fidelity Pensions Management and Financial Administration Services
Limited (a Fidelity Group company) are all authorised and regulated in the
UK by the Financial Services Authority and have their registered offices at
Oakhill House, 130 Tonbridge Road, Hildenborough, Tonbridge, Kent TN11 9DZ.
Tel 01732 361144. Fidelity only gives information on products and does not
give investment advice to private clients based on individual circumstances.
Any comments or statements made are not necessarily those of Fidelity. The
information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. If
you received this in error, please contact the sender and delete the
material from any computer. All e-mails sent from or to Fidelity may be
subject to our monitoring procedures. 'Direct link to Fidelitys website.


-Original Message-
From: Greg Allen [mailto:[EMAIL PROTECTED] 
Sent: 21 June 2006 12:37
To: Serlet Jean-Claude; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems


I didn't have socket_keepalive set.  But I added it and still have the same
problem.

 

>From my httpd.conf:

 

JkLogFile /var/log/httpd/mod_jk.log

JkLogLevel debug

 

# Just like workers.properties but exact line is prefixed

# with JkWorkerProperty

 

# Minimal jk configuration

JkWorkerProperty worker.list=ajp13w

JkWorkerProperty worker.ajp13w.type=ajp13

JkWorkerProperty worker.ajp13w.host=localhost

JkWorkerProperty worker.ajp13w.port=8009   

JkWorkerProperty worker.ajp13w.socket_keepalive=1   

 

# enter the full path to the tomcat webapps directory

JkAutoAlias /opt/tomcat/webapps

 

# Mount 'testapp' directory. It's physical location

# is assumed to be in the /opt/tomcat/webapps/testapp

# ajp13w is a worker defined in the workers.properties

JkMount /testapp/* ajp13w

 

# Unmount desired static content from testapp webapp.

# This content will be served by the httpd directly.

JkUnMount /testapp/images/*.gif ajp13w

JkUnMount /testapp/images/*.jpg ajp13w

 

-- Greg

 

 

 

 

  _  

From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:35 AM
To: Greg Allen; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems

 

Please give the configuration of your workers : the workers.properties.file

Have you set worker.yourworker.socket_keepalive=1 in it ?

 

Jean-Claude 

 

 


  _  


De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 20 juin 2006 16:42
À : users@tomcat.apache.org
Objet : Mod_jk/firewall configuration problems

I am having a problem with mod_jk.so. I have apache set up as my web
server, forwarding my jsp
traffic to a tomcat server running on the same machine.

 

This setup works fine when the client is inside of my firewall.
However, when I try to access

my site from outside the firewall, mod_jk does not forward the
traffic to tomcat and the page
is not displayed.

 

My firewall is set up to forward port 80 traffic from outside to my
web server machine. This
is working, as I can get non-tomcat served pages to appear on
clients outside of the firewall.

 

I have attached the debugging log from mod_jk. In it you can see two
requests - the first is 
from outside (which fails), while the second is from inside and you
can see that it is served
correctly.

 

I'm sure this is some sort of configuration issue.  But I don't know
what.  

 

Can anyone point out what is wrong?

 

Thanks,

 

-- Greg

 






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]

RE: Mod_jk/firewall configuration problems

2006-06-21 Thread Serlet Jean-Claude
Sorry : that 's all i thought
Hope that you don't forget to stop and restart your Apache server after
modifying workers.properties
 
 

Jean-Claude 

 


  _  

De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 21 juin 2006 13:37
À : Serlet Jean-Claude; users@tomcat.apache.org
Objet : RE: Mod_jk/firewall configuration problems



I didn't have socket_keepalive set.  But I added it and still have the same
problem.

 

>From my httpd.conf:

 

JkLogFile /var/log/httpd/mod_jk.log

JkLogLevel debug

 

# Just like workers.properties but exact line is prefixed

# with JkWorkerProperty

 

# Minimal jk configuration

JkWorkerProperty worker.list=ajp13w

JkWorkerProperty worker.ajp13w.type=ajp13

JkWorkerProperty worker.ajp13w.host=localhost

JkWorkerProperty worker.ajp13w.port=8009   

JkWorkerProperty worker.ajp13w.socket_keepalive=1   

 

# enter the full path to the tomcat webapps directory

JkAutoAlias /opt/tomcat/webapps

 

# Mount 'testapp' directory. It's physical location

# is assumed to be in the /opt/tomcat/webapps/testapp

# ajp13w is a worker defined in the workers.properties

JkMount /testapp/* ajp13w

 

# Unmount desired static content from testapp webapp.

# This content will be served by the httpd directly.

JkUnMount /testapp/images/*.gif ajp13w

JkUnMount /testapp/images/*.jpg ajp13w

 

-- Greg

 

 

 

 


  _  


From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:35 AM
To: Greg Allen; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems

 

Please give the configuration of your workers : the workers.properties.file

Have you set worker.yourworker.socket_keepalive=1 in it ?

 

Jean-Claude 

 

 


  _  


De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 20 juin 2006 16:42
À : users@tomcat.apache.org
Objet : Mod_jk/firewall configuration problems

I am having a problem with mod_jk.so. I have apache set up as my web server,
forwarding my jsp
traffic to a tomcat server running on the same machine.

 

This setup works fine when the client is inside of my firewall. However,
when I try to access

my site from outside the firewall, mod_jk does not forward the traffic to
tomcat and the page
is not displayed.

 

My firewall is set up to forward port 80 traffic from outside to my web
server machine. This
is working, as I can get non-tomcat served pages to appear on clients
outside of the firewall.

 

I have attached the debugging log from mod_jk. In it you can see two
requests - the first is 
from outside (which fails), while the second is from inside and you can see
that it is served
correctly.

 

I'm sure this is some sort of configuration issue.  But I don't know what.  

 

Can anyone point out what is wrong?

 

Thanks,

 

-- Greg

 



Re: pdf documents

2006-06-21 Thread Suba Suresh
Is this problem of document access in different directory with 5.5.17? I 
am  running the same build. Someone  posted last week under the topic 
"Tomcat configuration error" and yesterday Daniel has posted a similar 
problem under "Tomcat 5.5.17 and Ant".


suba suresh.

Mark Thomas wrote:

Bob Wyatt wrote:


Mark,

I appreciate all of your help and energy on my behalf...

But alas, this does not work for me...



Hmmm. Can you post your server.xml (with any passwords etc blanked out).

Thanks,

Mark

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mod_jk/firewall configuration problems

2006-06-21 Thread Raghupathy,Gurumoorthy
Can you send me how you are accessing the website from within the firewall
and how you are accessing the same outside the firewall ?

Can you also send me the server.xml 


Regards
Guru 

Gurumoorthy Raghupathy
Web Support - Fidelity Investments International
* Tel: +44 1737 836798
* Internal: 8-724 6798
* Tel (R): +442086610646
* Tel (R): +447899033459
* Tel (S): +447736059647 
* Mail-Zone : XTW2A
* E-Mail: <>

Important: Fidelity Investments International, Fidelity Investment Services
Limited, Fidelity Pensions Management and Financial Administration Services
Limited (a Fidelity Group company) are all authorised and regulated in the
UK by the Financial Services Authority and have their registered offices at
Oakhill House, 130 Tonbridge Road, Hildenborough, Tonbridge, Kent TN11 9DZ.
Tel 01732 361144. Fidelity only gives information on products and does not
give investment advice to private clients based on individual circumstances.
Any comments or statements made are not necessarily those of Fidelity. The
information transmitted is intended only for the person or entity to which
it is addressed and may contain confidential and/or privileged material. If
you received this in error, please contact the sender and delete the
material from any computer. All e-mails sent from or to Fidelity may be
subject to our monitoring procedures. 'Direct link to Fidelitys website.


-Original Message-
From: Greg Allen [mailto:[EMAIL PROTECTED] 
Sent: 21 June 2006 12:37
To: Serlet Jean-Claude; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems


I didn't have socket_keepalive set.  But I added it and still have the same
problem.

 

>From my httpd.conf:

 

JkLogFile /var/log/httpd/mod_jk.log

JkLogLevel debug

 

# Just like workers.properties but exact line is prefixed

# with JkWorkerProperty

 

# Minimal jk configuration

JkWorkerProperty worker.list=ajp13w

JkWorkerProperty worker.ajp13w.type=ajp13

JkWorkerProperty worker.ajp13w.host=localhost

JkWorkerProperty worker.ajp13w.port=8009   

JkWorkerProperty worker.ajp13w.socket_keepalive=1   

 

# enter the full path to the tomcat webapps directory

JkAutoAlias /opt/tomcat/webapps

 

# Mount 'testapp' directory. It's physical location

# is assumed to be in the /opt/tomcat/webapps/testapp

# ajp13w is a worker defined in the workers.properties

JkMount /testapp/* ajp13w

 

# Unmount desired static content from testapp webapp.

# This content will be served by the httpd directly.

JkUnMount /testapp/images/*.gif ajp13w

JkUnMount /testapp/images/*.jpg ajp13w

 

-- Greg

 

 

 

 

  _  

From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:35 AM
To: Greg Allen; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems

 

Please give the configuration of your workers : the workers.properties.file

Have you set worker.yourworker.socket_keepalive=1 in it ?

 

Jean-Claude 

 

 


  _  


De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 20 juin 2006 16:42
À : users@tomcat.apache.org
Objet : Mod_jk/firewall configuration problems

I am having a problem with mod_jk.so. I have apache set up as my web
server, forwarding my jsp
traffic to a tomcat server running on the same machine.

 

This setup works fine when the client is inside of my firewall.
However, when I try to access

my site from outside the firewall, mod_jk does not forward the
traffic to tomcat and the page
is not displayed.

 

My firewall is set up to forward port 80 traffic from outside to my
web server machine. This
is working, as I can get non-tomcat served pages to appear on
clients outside of the firewall.

 

I have attached the debugging log from mod_jk. In it you can see two
requests - the first is 
from outside (which fails), while the second is from inside and you
can see that it is served
correctly.

 

I'm sure this is some sort of configuration issue.  But I don't know
what.  

 

Can anyone point out what is wrong?

 

Thanks,

 

-- Greg

 



how to avoid dialog in basic authentication

2006-06-21 Thread markusin

Hello

I have two pages, where pages2 will be opened via a link from page1.
Page2 is only accessable via authentication (using BASIC).
So my question is, how can I avoid that from page1 when I am opening 
page2, the dialog for authentication, by using a default user? (i.e. guest).


Any ideas or good links

Markus


___ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Mod_jk/firewall configuration problems

2006-06-21 Thread Greg Allen
I didn't have socket_keepalive set.  But I added it and still have the same 
problem.

 

>From my httpd.conf:

 

JkLogFile /var/log/httpd/mod_jk.log

JkLogLevel debug

 

# Just like workers.properties but exact line is prefixed

# with JkWorkerProperty

 

# Minimal jk configuration

JkWorkerProperty worker.list=ajp13w

JkWorkerProperty worker.ajp13w.type=ajp13

JkWorkerProperty worker.ajp13w.host=localhost

JkWorkerProperty worker.ajp13w.port=8009   

JkWorkerProperty worker.ajp13w.socket_keepalive=1   

 

# enter the full path to the tomcat webapps directory

JkAutoAlias /opt/tomcat/webapps

 

# Mount 'testapp' directory. It's physical location

# is assumed to be in the /opt/tomcat/webapps/testapp

# ajp13w is a worker defined in the workers.properties

JkMount /testapp/* ajp13w

 

# Unmount desired static content from testapp webapp.

# This content will be served by the httpd directly.

JkUnMount /testapp/images/*.gif ajp13w

JkUnMount /testapp/images/*.jpg ajp13w

 

-- Greg

 

 

 

 

  _  

From: Serlet Jean-Claude [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 2:35 AM
To: Greg Allen; users@tomcat.apache.org
Subject: RE: Mod_jk/firewall configuration problems

 

Please give the configuration of your workers : the workers.properties.file

Have you set worker.yourworker.socket_keepalive=1 in it ?

 

Jean-Claude 

 

 


  _  


De : Greg Allen [mailto:[EMAIL PROTECTED] 
Envoyé : mardi 20 juin 2006 16:42
À : users@tomcat.apache.org
Objet : Mod_jk/firewall configuration problems

I am having a problem with mod_jk.so. I have apache set up as my web 
server, forwarding my jsp
traffic to a tomcat server running on the same machine.

 

This setup works fine when the client is inside of my firewall. 
However, when I try to access

my site from outside the firewall, mod_jk does not forward the traffic 
to tomcat and the page
is not displayed.

 

My firewall is set up to forward port 80 traffic from outside to my web 
server machine. This
is working, as I can get non-tomcat served pages to appear on clients 
outside of the firewall.

 

I have attached the debugging log from mod_jk. In it you can see two 
requests - the first is 
from outside (which fails), while the second is from inside and you can 
see that it is served
correctly.

 

I'm sure this is some sort of configuration issue.  But I don't know 
what.  

 

Can anyone point out what is wrong?

 

Thanks,

 

-- Greg

 



Re: file upload speed.

2006-06-21 Thread CMSuser

FYI-
 I've been using the curl command line client for the uploads and downloads.

When I tried the commons HttpClient from a java program, the upload/download
throughputs matched !! (at over 85% ).

regards,
Aman.

--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4972313
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat creating two threads for one request

2006-06-21 Thread Darryl Miles


ametsi wrote:

Having a similar problem, I would like to know if you have found any solution
on this...


No one quoted their Tomcat and JVM versions to help expose the problem.

How are you all sure its no a client problem ?


I can't see how the suggestion is listening on two ports can be a 
problem, that implies the client is sending the request via two 
different ports which is highly unlikely.


A workaround maybe to serialize the request processing.



Tomcat Version ??   JVM Version ??



Darryl

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: UTF-8 headers and JSP included files

2006-06-21 Thread Seak, Teng-Fong

Mark Thomas wrote:

Dariusz Wojtas wrote:
  

Any hints how to get rid of these extra FFFE chars?
My included files need to be UTF-8 encoded.


Use a text editor that doesn't insert these characters automatically.

Mark
   Yup, for example, Eclipse (version 3 or higher).  It is actually bad 
not to write BOM (those FFFE that you're talking about) but since some 
applications aren't programmed to recognize it, it's good for you.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat's scalability

2006-06-21 Thread Darryl Miles

Mladen Adamovic wrote:
Biernatowski, Is your HTTP application multi-threaded ?  

Irrelevant. Unimportant.


Why is that ?  What happens if his app is using this line in JSP ?

<%@ page isThreadSafe="false" %>

Google is your friend.


Or to have i.e. extremely large Lucene database or some other slow 
algorithm.


Why do you think he has lucene ?  Did he mention lucene ?  Or are you 
asking hypothetically, if so how does that help him ?




Darryl

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat's scalability

2006-06-21 Thread Darryl Miles

Mladen Adamovic wrote:

Max number of Java thread, IMHO.
Java thread is not the same as operating system thread.
In fact, JVM used to be single threaded on Linux and Windows and I'm not 
quite sure has it changed recently.
So, you might have 800 Java threads but it is still one thread on 
operating system.


I'm sure green threads which is a M:N threads policy have been gone a 
long while.  Its not even included as a fallback threading model with 
current JVMs from SUN.  Maybe you are not working from a modern Linux or 
Windows distribution or modern JVM ?



When you run "ps aux | grep java" you always see one operating system 
thread IMHO.


ps -La ??

Try "ps uaxm | less" each of the "-" lines under the process is a thread 
relating to that process.


Check out the "m,M,-T,-L" options and the man page, or just "ps -?"

Pick the leader and take a look in /proc//task/ for the threads 
under that process.




It means you don't exploit 4 processors if you have 4.
To exploit 4 processors you have to setup 4 JVM (4 tomcat instances) to 
do round robin.
As long as you have 1 JVM active you don't exploit thread level 
parallelism in operating system.



Certainly j2sdk1.4.2_12 and jdk1.5.0_07 from SUN both use NTPL on Linux 
which is 1:1.  I would think WIN32 already has good threading support. 
The current threading implementation in the last couple of years on 
Linux is NPTL.  Google is your friend.



Darryl

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using Datasource for cloudscape

2006-06-21 Thread Jitendra Kharche
 
Hi Dilan,

Thanks for helping again.
I had attached files but it seems attachments are not allowed. I am
adding the contets of these files below. To keep the mail size samll I
am removing old contents of the mail. For the sake of clarity I am
putting my problem statement also.

Problem:
I am using Tomcat 5.5.17 and tried running a sample datasource
application having a jsp page (see contents below) using the Cloudscape
database. I have added the driver jar into CATALINA_HOME/common/lib
directory. When I run the jsp I get following exception
WARNING: Unexpected exception resolving reference
java.lang.NoSuchMethodException:
com.ibm.db2j.jdbc.DB2jDataSource.setScope(boolean)
at java.lang.Class.getMethod(Class.java:1581)
at
com.ibm.db2j.jdbc.DB2jAbstractDataSource.getObjectInstance(Unknown
Source)
  



Contents of file CATALINA_HOME/webapps/myApp/dbdemo.jsp


<%@ page import="javax.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%  
Connection con = null;
Statement stmt = null;
try {
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup("java:comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/MyDB");
System.out.println("Got DataSource\n");
con = ds.getConnection();
System.out.println("Got Connection\n");
} catch(java.lang.Exception e) {
e.printStackTrace();
System.err.print(e.getClass().getName());
System.err.println(e.getMessage());
}

try {
stmt = con.createStatement();   
ResultSet rs = stmt.executeQuery("SELECT * FROM employee");
System.out.println("Table assignment after insertion:");
%>
Your table contains the following entries:


emp_idemp_nameemp_dept
<%
while (rs.next()) {
String emp_id = rs.getString("emp_id");
String emp_name  = rs.getString("emp_name");
String emp_dept = rs.getString("emp_dept");
%>


<%=emp_id%><%=emp_name%><%=emp_dept%>


<%
}
rs.close(); stmt.close(); con.close();
}
catch(java.lang.Exception e) {
e.printStackTrace();
}%>



Contents of file CATALINA_HOME/conf/server.xml




  
  
  
  
  



  
  





  
  
  

  




Contents of file CATALINA_HOME/webapps/myApp/WEB-INF/web.xml



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

datasourcedemo

index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



jdbc/MyDB
javax.sql.DataSource
Container





Contents of file CATALINA_HOME/webapps/myApp/META-INF/context.xml




  

 
Regards,
Jitendra Kharche


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: file upload speed.

2006-06-21 Thread Leon Rosenberg

The question is - how do you upload?

leon

On 6/21/06, CMSuser <[EMAIL PROTECTED]> wrote:


Antonio,
I've done other experiments (without tomcat) where the upload speed is
better. There are no throughput constraints in the network/server
configuration. Unless it's internally imposed by tomcat webserver.
Are there any such constraints in tomcat ?  is this throughput difference
deliberate ? could the configuration be tweaked to produce better upload
throughput ?
I've tried playing with the input/output buffer sizes in web.xml but no
significant benifit was seen.
Thanks,
Aman

--
View this message in context: 
http://www.nabble.com/file-upload-speed.-t1816944.html#a4968168
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Http11AprProtocol took 2 hr to init on http-443

2006-06-21 Thread Markus Schönhaber
Mladen Turk wrote:
> Markus Schönhaber wrote:
> > Maybe someone of the devs chimes in and proves me right or wrong.
>
> Use class="org.apache.coyote.http11.Http11BaseProtocol" inside
> 

Re: pdf documents

2006-06-21 Thread Pid
Don't you need to put the context file pdf.xml in a different place?
 $CATALINA_HOME/conf///pdf.xml

Once it's there you have to call the correct URL, which will be
 /pdf/.pdf




Bob Wyatt wrote:
> Mark,
> 
> I appreciate all of your help and energy on my behalf...
> 
> But alas, this does not work for me...
> 
> "The requested resource (/myapp/jsp/app/C666119.pdf) is not available..."
> 
> I removed the $CATALINA_HOME/webapps/myapp/WEB-INF/pdf.xml, and I modified
> $CATALINA_HOME/webapps/pdf.xml to read:
> # more pdf.xml
>  
> 
> The test to http://myip:8100/pdf also fails with resource unavailable...
> 
> The log file does not report any errors; the last entries are from the
> shutdown and restart of tomcat...
> 
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@38a11b3b')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@66cb5b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Lja
> va.lang.String;@1495b3c')
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/servlets-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@195f9b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@4745b3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.la
> ng.String;@345db3d')
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]SessionListener:
> contextDestroyed()
> 2006-06-20 19:24:58 StandardContext[/jsp-examples]ContextListener:
> contextDestroyed()
> 2006-06-20 19:25:39
> StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init():
> ruleChain: [org.apache.webapp.balan
> cer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target
> string: News / Redirect URL: http://www.cnn.com], [org.a
> pache.webapp.balancer.rules.RequestParameterRule: Target param name:
> paramName / Target param value: paramValue / Redirect URL: http
> ://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
> Redirect URL: http://jakarta.apache.org]]
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/jsp-examples]SessionListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]ContextListener:
> contextInitialized()
> 2006-06-20 19:25:39 StandardContext[/servlets-examples]SessionListener:
> contextInitialized()
> 
> Regards,
> 
> Bob
> 
> -Original Message-
> From: Mark Thomas [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 20, 2006 19:14
> To: Tomcat Users List
> Subject: Re: pdf documents
> 
> Bob Wyatt wrote:
>>   
> 
> Sorry, I should have read you post more carefully. The above works for
> 5.5.x but for 5.0.x you will need
>  
> 
> On this version directory listings are enabled so http://host:port/pdf
> should return a directory listing.
> 
>> So I then copied pdf.xml to $CATALINA_HOME/webapps/appname/WEB-INF,
> shutdown
>> and restarted Tomcat, and I receive the same error message.
> 
> I don't think this would ever work. I'd delete this copy of pdf.xml so
> it doesn't cause confusion down the road.
> 
> If, after a restart, this still doesn't work have a look in
> $CATALINA_HOME/logs and post the relevant sections of the logs.
> 
> Mark
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Http11AprProtocol took 2 hr to init on http-443

2006-06-21 Thread Mladen Turk

Markus Schönhaber wrote:

Maybe someone of the devs chimes in and proves me right or wrong.



Use class="org.apache.coyote.http11.Http11BaseProtocol" inside


Re: Tomcat 5.5.17 APR/SSL Client Certificat

2006-06-21 Thread alym

Thanks for your answer

I use openssl 0.9.8 to generate self-signed ca-certificat , and server
certificat and user certificat
if i use tomcat whitout apr but with jsse i get my client certificat  (of
course i use keytool to import
all certificats generated by openssl ). If i use apache 2 + mod_jk + tomcat
everything work well, i
get also my client certificat. 

Well, i am under solaris 8, and i use the same user-account to install all
products (apache tomcat and so one) i.e. i have the good right to do that.

Regards,
Jean-Michel


--
View this message in context: 
http://www.nabble.com/Tomcat-5.5.17-APR-SSL-Client-Certificat-t1810149.html#a4970437
Sent from the Tomcat - User forum at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Http11AprProtocol took 2 hr to init on http-443

2006-06-21 Thread Markus Schönhaber
Jeff Chuang wrote:
> I could reproduce this problem on ALL my dual core AMD Opteron servers
> running FC5-x86_64. Not sure it is OS porting problem? JVM problem?
> native jni problem? or combination?
> Is it possible to configure Tomcat to use APR on port 80, but disable
> APR on port 443 to use regular java keystore PKCS12 format? I have tried
> to build jni connectors using --without-ssl option and configure
> connector on 443 with PKCS12 keystoreType and certificate(which works
> without APR) in server.xml. However, port 80 works fine, but port 443
> does not(still use Http11AprProtocol, NOT Http11BaseProtocol). Any work
> around suggestion? thanks.

Since I'm not too familiar with Tomcat's code I can't give an authorative 
answer, but I doubt that's possible to mix Base and APR Connectors. AFAICT 
Tomcat uses APR if tcnative can be loaded and is usable, and it does so for 
all configured Connectors.
Maybe someone of the devs chimes in and proves me right or wrong.

Regards
  mks

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Using Datasource for cloudscape

2006-06-21 Thread Dilan Kelanibandara
Hi Jitendra,

Have you created an application called myApp in webapps. You forgot to
attach files it seems. I did not receive any attachment.

Regards,
Dilan

-Original Message-
From: Jitendra Kharche [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 21, 2006 10:24 AM
To: Tomcat Users List
Subject: RE: Using Datasource for cloudscape

 
Hi Dilan,

Thanks for helping.
Attaching the files
CATALINA_HOME/conf/server.xml
CATALINA_HOME/webapps/myApp/WEB-INF/web.xml
CATALINA_HOME/webapps/myApp/META-INF/context.xml

The context.xml is placed in CATALINA_HOME/webapps/myApp/META-INF.
There are no additional config files for database or resources.
Please ask any additional info required.
 
Regards,
Jitendra Kharche
Geometric Software Solutions Co. Ltd.
Work: +91-20-2290 6351
 

This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named
above. If you are not the intended recipient, please do not review,
disclose, disseminate, distribute or copy this e-mail and attachments.
If you have received this communication in error, please notify the
sender immediately by email or telephone at+91-20-22906351.
*

-Original Message-
From: Dilan Kelanibandara [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 8:58 PM
To: 'Tomcat Users List'
Subject: RE: Using Datasource for cloudscape

Hi Jitendra,

To claryfiy your error please send followings in your configuration (as
an attachment or copy ,paste here)

CATALINA_HOME/conf/server.xml
CATALINA_HOME/webapps/yourApp/WEB-INF/web.xml
context.xml
Where do you have defined your context.xml?

And any other additional configuration files you have for database
configuration and resource references

Regards,
Dilan

-Original Message-
From: Jitendra Kharche [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 6:20 PM
To: Tomcat Users List
Subject: RE: Using Datasource for cloudscape

 
Hi Dilan,

Please see my next mail. In which I have modified the context.xml and
got following error
WARNING: Unexpected exception resolving reference
java.lang.NoSuchMethodException:
com.ibm.db2j.jdbc.DB2jDataSource.setScope(boolean)
at java.lang.Class.getMethod(Class.java:1581)
at
com.ibm.db2j.jdbc.DB2jAbstractDataSource.getObjectInstance(Unknown
Source)
  

Then I added the resourec-ref entry in web.xml, but I still get the same
error.
 
Regards,
Jitendra Kharche
Geometric Software Solutions Co. Ltd.
Work: +91-20-2290 6351
 

This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named
above. If you are not the intended recipient, please do not review,
disclose, disseminate, distribute or copy this e-mail and attachments.
If you have received this communication in error, please notify the
sender immediately by email or telephone at+91-20-22906351.
*

-Original Message-
From: Dilan Kelanibandara [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 8:34 PM
To: 'Tomcat Users List'
Subject: RE: Using Datasource for cloudscape

Hi Jitenra,
Tomcat5.5 uses a defferent way of defining JNDI resources. That is why
you get this error. It seems your resource declaration at web.xml is
missing. 
Please stick to tomcat documentation here
http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html

where you have to define context.xml in
CATALINA_HOME/webapps/yourApp/META-INF/

you have to define database connectivity in
CATALINA_HOME/conf/server.xml as usual, where tomcat has commented all
the sample database connectivities.
Uncomment your required one their and define them

web.xml should have resource declaration at bottom if web.xml file (this
is normally, but where you declare in web.xml depends on your other
resource declaration at web.xml)

That is all you have to do. Please stick to tomcat documentation.

Regards,
Dilan Kelanibandara

-Original Message-
From: Jitendra Kharche [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 5:28 PM
To: Tomcat Users List
Subject: Using Datasource for cloudscape

 
Hi All,

I am using Tomcat 5.5.17 and tried running a sample datasource
application using the Cloudscape database. I have added the driver jar
into common/lib directory.

The context.xml has following configuration for datasource
  

I have created a datasource using the admin application and it added
following entry in server.xml


The appliaction has a jsp page with following code

Connection con = null;
Statement stmt = null;
try {
Context initContext = new InitialContext();
Context envContext  =
(Context)initContext.lookup("java

Re: Mod_jk/firewall configuration problems

2006-06-21 Thread Francis Galiegue

2006/6/21, Serlet Jean-Claude <[EMAIL PROTECTED]>:

Please give the configuration of your workers : the workers.properties.file
Have you set worker.yourworker.socket_keepalive=1 in it ?



Hmm, I didn't know about this option. Sometimes in our webapp we get a
strange behaviour, that is in the middle of our navigation some pages
just won't display and either IE or Firefox say "Server timeout". Do
you think it can be related to this?

--
Francis Galiegue, [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED]
One2team - 12bis rue de la Pierre Levée, 75011 Paris - 0143381980
"When it comes to performance, weight is everything" - Tiff Needell

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >