Re: anyone ever altered the Tomcat API to create a Login Attempt limit in the security constraint?

2007-04-25 Thread Johnny Kewl


Yes that is true, as soon as you use the security XML stuff, tomcat starts 
doing its thing, but if you dont use it, tomcat ignores security, and you 
can write your own code in a servlet.

Thing is its then portable to any servlet container...
If you using BASIC its actually very easy to do... just search for 
programmatic security in servlets... you sure to find the code.



- Original Message - 
From: "Propes, Barry L " <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, April 24, 2007 7:52 PM
Subject: RE: anyone ever altered the Tomcat API to create a Login Attempt 
limit in the security constraint?



I'd be glad to write it inside my own, but I figured using the security 
constraint, you were bound to their classes.




-Original Message-
From: Johnny Kewl [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 24, 2007 12:45 PM
To: Tomcat Users List
Subject: Re: anyone ever altered the Tomcat API to create a Login
Attempt limit in the security constraint?



I think you would be better off writing a little authentication code inside
your servlets...
However if you want to modify tomcat, you'll find that stuff in

package org.apache.catalina.authenticator;
public class BasicAuthenticator

all I wanted to to say is that some browsers like IE do their own thing.
Like for example... send this standard challenge to IE repeatedly

   response.setStatus(response.SC_UNAUTHORIZED); // I.e.,
401
   response.setHeader("WWW-Authenticate", "BASIC
realm=\"User Check\"");

and you'll see after a few tries it gives up anyway ;)
not much a Tomcat can do to change that




- Original Message - 
From: "Propes, Barry L " <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Tuesday, April 24, 2007 7:11 PM
Subject: anyone ever altered the Tomcat API to create a Login Attempt limit
in the security constraint?


Any version? 4x. 5x?

I'm actually in the 4.1.3. series, but was wondering which class files I'd
need to revise and customize.

I assume most if not all are in the /catalina/src/share/org/apache/catalina/
repository, and figured something like Authenticator.java or Session.java
might need a method added to it, but wasn't sure what else would need to be
done.

In other words, whereas in its initial state the security constraint will
repeatedly forward/redirect to the Login error page set, I'd like to be able
to create a customized method to send to another (secondary) error page,
telling the user they've been locked out after 6 consecutive, unsuccessful
attempts.

Is this at all possible to do in 4.1 or any other version?

Any feedback is welcomed.

Thanks!

Barry


-
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: Imposible set default application out of ROOT environment with TOMCAT-5.5.20?

2007-04-25 Thread aordin

SOLVED!!!

In first time, thank you a lot Markus!
Finally i solved the problem with Apache2, i put one apache2 server 
connected to Tomcat, and with mod_proxy_ajp redirects the request to my 
application.


Adolfo.

Markus Schönhaber wrote:

aordin schrieb:

  
I'm looking for set my application(jetspeed2 portal) like default into 
Tomcat 5.5.20, i find some messages spoken about put the application 
into /webapps/ROOT/ and it works but works quite bad because my 
application show a lot of problems with Javascript.
Is it possible to specify that my default application in 
http://localhost:8080 was /webapps/myApplication/ ?



And what problems might that be?

  

I build one /conf/Catalina/localhost/myApplication.xml and
/conf/Catalina/localhost/ROOT.xml



Am I right when I guess that you use absolute paths (i. e. something
like "/myApplication/...") to reference your JavaScript files? If so,
you should fix those paths. And if you don't have a good reason for
using absolute paths, change them to be relative.

  





You should read
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
again. There are few situations where setting "path" or "docBase" is
allowed.

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]



Organizing WEB-INF/lib

2007-04-25 Thread JavierL


Hi

I've a an Axis war where a lot of people publish applications and then, lib
directory is caotic with a lot of jar files. Each time somebody delete your
webservice application, he/she can't delete related jar files because
ignores if somebody else is using it.

I want to arrange and organize and then I wonder if there is a way to make
subfolders inside WEB-INF/lib to allow each application to place its own
related jars and keep root WEB-INF/lib just as a "commons" folder where
place only shared jars.


Is this possible ? 

Any idea/clue welcome...


Thanks in advance

J



-- 
View this message in context: 
http://www.nabble.com/Organizing-WEB-INF-lib-tf3643789.html#a10176181
Sent from the Tomcat - User mailing list archive 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: linux + tomcat, some path/link problem

2007-04-25 Thread Johnny Kewl


No... what I'm trying to tell you is that if your servlet makes a page with 
file/// links... microsofts new security is going to stop it from 
working nothing to do with Tomcat.


Other browsers also do it
If a page is delivered by Tomcat or any server with file:/// links you going 
to have problems.


Here are somethings to help u
http://blogs.msdn.com/ie/archive/2006/12/06/file-uris-in-windows.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;896204
http://kb.mozillazine.org/Links_to_local_pages_don't_work

And I just had lots of problems on IE with local file links...

ITS A SECURITY THING.. NOT TOMCAT

regards
Johnny

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

To: "Tomcat Users List" 
Sent: Wednesday, April 25, 2007 3:45 AM
Subject: Re: linux + tomcat, some path/link problem



thanks men, actually I've already tried to add " file:// " prefix
explicitly to filePath in A href link, and in mozilla I can see the
property of link appear to be " file:///root/test.html " , which is a
good sign, huh? but, woo, hate this but, no matter how hard i clicked,
the browsers made no reaction, it won't jump to test.html. the same
thing happened in opera, so I guess it maybe still have something to
with tomcat. I'm gonna work on this after work


Johnny Kewl <[EMAIL PROTECTED]>
Caldarale, Charlie R <[EMAIL PROTECTED]>
Fargusson.Alon <[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]



Tomcat - CometProcessor question

2007-04-25 Thread Praveen Balaji
Hi all,
Not sure if the subject is appropriate. Here's a description of what I
need to achieve:

I have a servlet that can block on a request for a long duration. This
essentially means the Tomcat processor thread that is serving the HTTP
request is blocked and unable to process more incoming requests.

>From a broader sense, what I need to achieve is to get hold of the
client socket I/O streams and let the Tomcat processor thread free. I
want to process the request OUTSIDE the lifecycle of the service method.
This is so I can achieve better response time with less processor
threads.

I understand that the Servlet Specification no longer mandates that the
request be serviced in the service method. I also understand that
Tomcat6 leverages java's NIO support to provide these non-blocking
semantics to servlets that implement CometProcessor. However, my
observation is that this is particularly useful for AJAX (and similar)
client applications that use a keep alive connection to provide
responsive UI. My primary requirement is that:

1.  I have control of reading the request. I do not want to wait on
comet events to read the request payload.
2.  I should be able to respond at a later point of time. So I need
a handle to the socket output stream.

Is the NIO Connector and CometProcessor the right solution for my
problem? If yes, how do I achieve the above requirements? If not, does
Tomcat provide me any alternatives?


Any help will be greatly appreciated and willingly devoured.

Thanks,
Praveen


Cas Filter, security filter and tomcat manager

2007-04-25 Thread Aurélien Allienne

Hi,

I want to use these filters for authenticate on tomcat manger. I use this
wiki page :
http://www.ja-sig.org/wiki/display/CASC/Combining+CASFilter+with+Tomcat+Realms+using+SecurityFilter
http://www.ja-sig.org/wiki/display/CAS/CASifying+Tomcat+Manager

So I have this in my web.xml :

 ...

   CASFilter
   edu.yale.its.tp.cas.client.filter.CASFilter

   
   edu.yale.its.tp.cas.client.filter.loginUrl

   https:///auth.univ-lille2.fr/cas/login

   
   
   edu.yale.its.tp.cas.client.filter.validateUrl

   https://auth.univ-lille2.fr/cas/serviceValidate

   
   
   edu.yale.its.tp.cas.client.filter.serverName

   agenda.univ-lille2.fr:8080
   
   

   
   CASFilter
   /*
   

 
   Security Filter
   org.securityfilter.filter.SecurityFilter

   
   config
   /WEB-INF/securityfilter-config.xml

   Configuration file location (this is the
default value)
   
   
   validate
   false
   Validate config file if set to
true
   
   
   formPattern
   /logMeIn
   
   As an example a login form can define "logMeIn" as it action
in place of the standard
   "j_security_check" which is a special flag user by app
servers for container managed security.
   
   
 

 
   Security Filter
   /*
 

 

I have create a securityfilter-config.xml



http://www.securityfilter.org/dtd/securityfilter-config_2_0.dtd";>

 

  
   
   Secure Pages
/*


tomcat admin

  
  
CAS


/html/index.html

  

  
  

  
   
   
   
   ldap://ldapmasta:1389"/>
   
   
   
   
   
   
   
  



And i put casclient.jar and all jar of the security filter projet in
WEB-INF/lib.

For me there are no problem but i have this in the browser :

HTTP Status 404 - Servlet HTMLManager is not available
--

*type* Status report

*message* *Servlet HTMLManager is not available*

*description* *The requested resource (Servlet HTMLManager is not available)
is not available.*
--
Apache Tomcat/5.5

And in the log :

INFO http-8080-Processor25
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
- Marking servlet HTMLManager as unavailable
INFO http-8080-Processor25
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]
- Marking servlet HTMLManager as unavailable


What is the problem?

Cordially

Aurelien Allienne


Re: linux + tomcat, some path/link problem

2007-04-25 Thread David Smith
Johnny's right.  Just think of the fun and hijinks malicious web 
developers could bring to the table if they could reference any file 
(document or command) they could guess the path to.Add some ajax and 
the fun get's even better. 


IMHO, it's a good thing this doesn't work.

--David

Johnny Kewl wrote:



No... what I'm trying to tell you is that if your servlet makes a page 
with file/// links... microsofts new security is going to stop it from 
working nothing to do with Tomcat.


Other browsers also do it
If a page is delivered by Tomcat or any server with file:/// links you 
going to have problems.


Here are somethings to help u
http://blogs.msdn.com/ie/archive/2006/12/06/file-uris-in-windows.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;896204
http://kb.mozillazine.org/Links_to_local_pages_don't_work

And I just had lots of problems on IE with local file links...

ITS A SECURITY THING.. NOT TOMCAT

regards
Johnny

- Original Message - From: "LRS" <[EMAIL PROTECTED]>
To: "Tomcat Users List" 
Sent: Wednesday, April 25, 2007 3:45 AM
Subject: Re: linux + tomcat, some path/link problem



thanks men, actually I've already tried to add " file:// " prefix
explicitly to filePath in A href link, and in mozilla I can see the
property of link appear to be " file:///root/test.html " , which is a
good sign, huh? but, woo, hate this but, no matter how hard i clicked,
the browsers made no reaction, it won't jump to test.html. the same
thing happened in opera, so I guess it maybe still have something to
with tomcat. I'm gonna work on this after work


Johnny Kewl <[EMAIL PROTECTED]>
Caldarale, Charlie R <[EMAIL PROTECTED]>
Fargusson.Alon <[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]



mod_jk - load balancing

2007-04-25 Thread Gregor Novak
Hi all,

 

I'm trying to configure mod_jk as load balancer and I was not so
successful so far.

 

My environment architecture looks like this:

 

2 servers running each 3 instances of JBoss/tomcat Aplication server
with ports 8080,8081 and 8082.

Into each server instance I add AJP 13 protocol like this:

 

  

 

redirectPort is set accordantly to the server instance.

 

For now workes.properties file looks like this:

 

worker.list=worker1,worker2

 

  # Set properties for worker1 (ajp13)

  worker.worker1.type=ajp13

  worker.worker1.host=ps1

  worker.worker1.port=8003

  worker.worker1.lbfactor=1

  worker.worker1.connection_pool_timeout=600

  worker.worker1.socket_keepalive=1

  worker.worker1.socket_timeout=60

 

   # Set properties for worker3 (lb) which use worker1

  worker.worker2.balance_workers=worker1

 

ps1 is one of the above mention servers. And for now I'm only trying to
make it work one instance.

 

Apache server, which should balance and forward all the requests coming
for servers, is set up on apache server located on another (3rd)machine.


Httpd.conf is set like this:

 

# Load mod_jk module

# Update this path to match your modules location

LoadModulejk_module  modules/mod_jk.so

# Where to find workers.properties

# Update this path to match your conf directory location (put
workers.properties next to httpd.conf)

JkWorkersFile conf/workers.properties

# Where to put jk shared memory

# Update this path to match your local state directory or logs directory

JkShmFile logs/mod_jk.shm

# Where to put jk logs

# Update this path to match your logs directory location (put mod_jk.log
next to access_log)

JkLogFile logs/mod_jk.log

# Set the jk log level [debug/error/info]

JkLogLeveldebug

# Select the timestamp log format

JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

 

When I start Apache mod_jk is loading because log file is created, but
forward to application server is not working. I always get apache
response and not the tomcat services on production servers. 

 

What else should I add into configuration files to make this
configuration work.

 

Thank you all for all your help

 

Cheers 

 

Grega



RE: Tomcat - CometProcessor question

2007-04-25 Thread Reich, Matthias
Hi,

I am working on a similar scenario and currently elaborate on the Comet
interfaces.

1. With the BEGIN event you get a fully parsed request object, i.e. you
don't need to wait for READ events to start processing the request.

2. You can keep a reference to the request and response object so that
you will be able to send the Response asynchronously.

Thus, I think Comet is the right offering for such a scenario.

However, I already learned the lesson, that you need to carefully
sychronize access especially to the response object
between the thread that runs the servlet's event method and the thread
that provides the result.
In my tests, I am still struggeling with problems like e.g. memory
leaks, so I am not yet in the situation of having a stable running
solution.


Regards,
Matthias Reich

-Original Message-
From: Praveen Balaji [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 11:51 AM
To: users@tomcat.apache.org
Subject: Tomcat - CometProcessor question

Hi all,
Not sure if the subject is appropriate. Here's a description of what I
need to achieve:

I have a servlet that can block on a request for a long duration. This
essentially means the Tomcat processor thread that is serving the HTTP
request is blocked and unable to process more incoming requests.

>From a broader sense, what I need to achieve is to get hold of the
client socket I/O streams and let the Tomcat processor thread free. I
want to process the request OUTSIDE the lifecycle of the service method.
This is so I can achieve better response time with less processor
threads.

I understand that the Servlet Specification no longer mandates that the
request be serviced in the service method. I also understand that
Tomcat6 leverages java's NIO support to provide these non-blocking
semantics to servlets that implement CometProcessor. However, my
observation is that this is particularly useful for AJAX (and similar)
client applications that use a keep alive connection to provide
responsive UI. My primary requirement is that:

1.  I have control of reading the request. I do not want to wait on
comet events to read the request payload.
2.  I should be able to respond at a later point of time. So I need
a handle to the socket output stream.

Is the NIO Connector and CometProcessor the right solution for my
problem? If yes, how do I achieve the above requirements? If not, does
Tomcat provide me any alternatives?


Any help will be greatly appreciated and willingly devoured.

Thanks,
Praveen

-
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: Memory Leak with Comet

2007-04-25 Thread Reich, Matthias
I tried with Tomcat6 compiled from trunk revision 532271 and two
browsers sending the requests.

Unfortunately it is not that easy for me to put the dump on a public web
server.
Instead, I had a look at the dump myself.

First I ran Tomcat with a single connector with attribute maxThreads=20,
and started it with -Xmx10m.
In the dump I saw 103 instances of class
org.apache.coyote.http11.Http11AprProcessor and the same number of all
the attached objects like Request, Response ...

I tried again with -Xmx20m (same configuration otherwise) and saw 249
instances of class org.apache.coyote.http11.Http11AprProcessor.

Thus, let us guess that the number of instances increases if I spend
more memory.


As far as I could see the ConcurrentLinkedQueue
recycledProcessors  contains a single entry.

But the RequestGroupInfo holds 249 instances of
org.apache.coyote.RequestInfo:

Instance of java.util.ArrayList (12 bytes)
Class:
class java.util.ArrayList
Instance data members:
elementData (L) : Instance of [Ljava.lang.Object;@0x27e379b0 (1204
bytes)
modCount (I) : 249
size (I) : 249
Object allocated from:
References to this object:
[EMAIL PROTECTED] (44 bytes) : field
processors


-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 11:47 PM
To: Tomcat Users List
Subject: Re: Memory Leak with Comet

Why don't you enable -XX:+HeapDumpOnOutOfMemoryError and send us a link 
where we can download the HPROF files that get generated.
Also send us your config as well when you get the error
Filip

-
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: Memory Leak with Comet

2007-04-25 Thread Rémy Maucherat

On 4/25/07, Reich, Matthias <[EMAIL PROTECTED]> wrote:

First I ran Tomcat with a single connector with attribute maxThreads=20,
and started it with -Xmx10m.
In the dump I saw 103 instances of class
org.apache.coyote.http11.Http11AprProcessor and the same number of all
the attached objects like Request, Response ...


This basically means what I said: the connections and their associated
processors are never properly closed and recycled for some reason.

Rémy

-
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: Can't create jdbc resource in context.xml

2007-04-25 Thread Glen Vermeylen

It also doesn't work with the resource-ref element. The error was ""
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context"",
but I was able to lookup the jdbc/sandwiches datasource using programmatic
jndi lookup.
Weird part is that everything works fine if I move the datasource element
from the context file to server.xml. Is it possible that the realm gets
initialized before the datasource or that something causes the realm to
initialize in a different context where it doesn't have access to the
datasource?

Anyways, thank you very much for your help. I've found a solution which
works but if there are some suggestions on how to get it to work using a
datasourcerealm I will still try them out.

Regards,
Glen.


2007/4/23, Rashmi Rubdi <[EMAIL PROTECTED]>:


Hi Glen,

I compared your configuration with the standard configuration
mentioned
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and found a few differences.

Please see my replies to your post below:

On 4/20/07, Glen Vermeylen <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I'm trying to move a global jdbc resource out of server.xml so it is
> application specific. Following is the server.xml (which works fine)
.
>
> What I did was remove the the  and 
elements
> from server.xml and put them inside
> $CATALINA_HOME/conf/Catalina/localhost/esandwich.xml (don't mind the
weird
> name :) ), but I keep getting the error
> "javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context"
>
> esandwich.xml:
>  crosscontext="true">

crossContext attribute's case needs to be crossContext , but it is
specified as crosscontext.

One question, though a little irrelevant is -- do you really need
crossContext="true" ? Just because it is specified in the sample on
the JDBC Datasource HowTo page, doesn't mean you would need it - this
is just a thought. If you don't need it, please set it to false or
remove the attribute.

>  password="tomcat" type="javax.sql.DataSource"
>
url="jdbc:mysql://192.168.16.39:3306/sandwiches?autoReconnect=true"
> username="tomcat" />
>
>
>  dataSourceName="jdbc/sandwiches" debug="99" roleNameCol="role"
> userCredCol="password" userNameCol="user"
userRoleTable="userroles"
> userTable="users" />
> 
>
> I believe the problem lies witht he  element

No the problem is in web.xml , I don't see any definition for:



please see under "3. web.xml configuration" at

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
for the details on web.xml entries.

> because if only move
> the  element to the esandwich.xml and leave the
>  in server.xml everything
still
> works. We've been searching for a few hours now and can't find the
solution.
> Any help would be highly appreciated.
>
> web.xml:
> 
>  xmlns="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";>
> esandwich
> 
> 
> org.springframework.web.context.ContextLoaderListener
> 
> 
> 
> dispatcher
> 
> org.springframework.web.servlet.DispatcherServlet
> 
> 
> 
> dispatcher
> /app/*
> 
> 
> index.jsp
> 
> 
> FORM
> 
> /login.html
> /loginError.html
> 
> 
>
> 
> 
> default
> /app/*
> POST
> GET
> 
> 
> everyone can log in
> *
> 
> 
>
> 
> The Only Secure Role
> admin
> 
>
> 
>
>
> Many thanks in advance,
> Glen.
>

-Regards
Rashmi

-
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: linux + tomcat, some path/link problem

2007-04-25 Thread LRS

David Smith <[EMAIL PROTECTED]>
Martin Gainty <[EMAIL PROTECTED]>
Johnny Kewl <[EMAIL PROTECTED]>
Caldarale, Charles R <[EMAIL PROTECTED]>
Fargusson.Alan <[EMAIL PROTECTED]>

thank all you guys and those who are paying attention to this topic.

to Martin : thanks for reminding me of policy, i didn't know much of
that. but given with the same policy file, my web still goes well in
windows while it failed in linux, i don't think the problem is about
tomcat policy.

to Johnny: thanks for your fruitful information, although i did in
accord to what http://kb.mozillazine.org/Links_to_local_pages_don't_work
conducted, things still dont work out, and I got exhausted guessing
how many fold of slash there should be... oh,
internet/security/http/URI/browser/tomcat, everything goes wild, way
beyond I've expected. so i end up using LocalLink extention (a plugin
of mozilla firefox found in the page mentioned above) as a workaround,
anyway, my interest is about lucene + inotify, not firefox or tomcat.
and about ESE(from your description it seems like a program like
beagle), i'm intrigued about how it works around security problem, I'd
like to look into it some time.

thanks for all you guys' help and kindness again.

-
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: Memory Leak with Comet

2007-04-25 Thread Reich, Matthias
So far, I have the feeling that I am the only one who has seen these memory 
leaks with asynchronous Comet responses.

I tried with a number of variations, e.g.
- let the browser wait for 500 millis before sending the next poll after 
receiving a result
- keep the events queued in the serverfor at least 500 millis before sending 
the response
- modify synchronization and the places where I invoke event.close()
- tried with connector attribute maxKeepAliveRequests="-1" and 
maxKeepAliveRequests="2"
but the effect is always the same.

Thus, I doubt that it is really 'wrong' usage of the interfaces, and others 
should have seen similar effects.

Has anyone out there run an application with browsers as clients and with 
asynchronous responses for a longer time without loosing memory?

Or am I the only one so far working on such a scenario?

Matthias


-Original Message-
From: Rémy Maucherat [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 3:11 PM
To: Tomcat Users List
Subject: Re: Memory Leak with Comet

On 4/25/07, Reich, Matthias <[EMAIL PROTECTED]> wrote:
> First I ran Tomcat with a single connector with attribute maxThreads=20,
> and started it with -Xmx10m.
> In the dump I saw 103 instances of class
> org.apache.coyote.http11.Http11AprProcessor and the same number of all
> the attached objects like Request, Response ...

This basically means what I said: the connections and their associated
processors are never properly closed and recycled for some reason.

Rémy

-
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 - load balancing

2007-04-25 Thread Peter . Henningsen
Hello Gregor,

did you configure jk_mounts in jk.conf ? They determine, what is passed on 
via the loadbalancer-worker to tomcat.

Also, I dislike the idea to habe the same ajp-Port al all instances (or do 
they have different names?).

Finally, do not forget to set the individual jvm_route on the 
host-configuration inside tomcat's server.xml

Regards,
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: Can't create jdbc resource in context.xml

2007-04-25 Thread Martin Gainty
in your webapp WEB-INF/web.xml you will need to define the 
ContextLoaderListener

then you will also need a way to define the root context

if you want to locate the parameters in your applicationContext.xml try


 
org.springframework.web.context.ContextLoaderListener




 contextConfigLocation
 /WEB-INF/applicationContext-jdbc.xml
 


Does this help?
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: "Glen Vermeylen" <[EMAIL PROTECTED]>

To: "Tomcat Users List" 
Sent: Wednesday, April 25, 2007 10:07 AM
Subject: Re: Can't create jdbc resource in context.xml



It also doesn't work with the resource-ref element. The error was ""
javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context"",
but I was able to lookup the jdbc/sandwiches datasource using programmatic
jndi lookup.
Weird part is that everything works fine if I move the datasource element
from the context file to server.xml. Is it possible that the realm gets
initialized before the datasource or that something causes the realm to
initialize in a different context where it doesn't have access to the
datasource?

Anyways, thank you very much for your help. I've found a solution which
works but if there are some suggestions on how to get it to work using a
datasourcerealm I will still try them out.

Regards,
Glen.


2007/4/23, Rashmi Rubdi <[EMAIL PROTECTED]>:


Hi Glen,

I compared your configuration with the standard configuration
mentioned
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and found a few differences.

Please see my replies to your post below:

On 4/20/07, Glen Vermeylen <[EMAIL PROTECTED]> wrote:
> Hello everybody,
>
> I'm trying to move a global jdbc resource out of server.xml so it is
> application specific. Following is the server.xml (which works fine)
.
>
> What I did was remove the the  and 
elements
> from server.xml and put them inside
> $CATALINA_HOME/conf/Catalina/localhost/esandwich.xml (don't mind the
weird
> name :) ), but I keep getting the error
> "javax.naming.NameNotFoundException: Name jdbc is not bound in this
Context"
>
> esandwich.xml:
>  crosscontext="true">

crossContext attribute's case needs to be crossContext , but it is
specified as crosscontext.

One question, though a little irrelevant is -- do you really need
crossContext="true" ? Just because it is specified in the sample on
the JDBC Datasource HowTo page, doesn't mean you would need it - this
is just a thought. If you don't need it, please set it to false or
remove the attribute.

>  password="tomcat" type="javax.sql.DataSource"
>
url="jdbc:mysql://192.168.16.39:3306/sandwiches?autoReconnect=true"
> username="tomcat" />
>
>
>  dataSourceName="jdbc/sandwiches" debug="99" roleNameCol="role"
> userCredCol="password" userNameCol="user"
userRoleTable="userroles"
> userTable="users" />
> 
>
> I believe the problem lies witht he  element

No the problem is in web.xml , I don't see any definition for:



please see under "3. web.xml configuration" at

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
for the details on web.xml entries.

> because if only move
> the  element to the esandwich.xml and leave the
>  in server.xml everything
still
> works. We've been searching for a few hours now and can't find the
solution.
> Any help would be highly appreciated.
>
> web.xml:
> 
>  xmlns="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";>
> esandwich
> 
> 
> org.springframework.web.context.ContextLoaderListener
> 
> 
> 
> dispatcher
> 
> org.springframework.web.servlet.DispatcherServlet
> 
> 
> 
> dispatcher
> /app/*
> 
> 
> index.jsp
> 
> 
> FORM
> 
> /login.html
> /loginError.html
> 
> 
>
> 
> 
> default
> /app/*
> POST
> GET
> 
> 
> everyone can log in
> *
> 
> 
>
> 
> The Only Secure Role
> admin
> 
>
> 
>
>
> Many thanks in advance,
> Glen.
>

-Regards
Rashmi

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







---

problem switching to port 80

2007-04-25 Thread John Pedersen

Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)
at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

-
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: problem switching to port 80

2007-04-25 Thread Larry Meadors

Looks like something else is listening on port 80. Is IIS running?

Larry


On 4/25/07, John Pedersen <[EMAIL PROTECTED]> wrote:

Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)
at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

-
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: problem switching to port 80

2007-04-25 Thread Huseyin Sinecan
The reason might be related with administration rights. Not every user has the 
right to run an application which listens to requests on port 80.
since 8080 > 1024, so you don't live any problem.

I couldn't get the whole picture in my head actually. I just wanted to remind 
this.

Regards

hs

Larry Meadors <[EMAIL PROTECTED]> wrote: Looks like something else is listening 
on port 80. Is IIS running?

Larry


On 4/25/07, John Pedersen  wrote:
> Hi,
>
> I have an app running fine on port 8080, but nothing works when I
> switch to port 80 -
>
> in server.xml, changing:
>
> 
>maxThreads="150" connectionTimeout="2"
>redirectPort="8443" />
>
> to
>
> 
>maxThreads="150" connectionTimeout="2"
>redirectPort="8443" />
>
> I get this error message:
>
> SEVERE: Error starting endpoint
> java.lang.Exception: Socket bind failed: [730048] Only one usage of
> each socket address (protocol/network address/port)  is normally
> permitted.
> at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
> at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
> at 
> org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)
> at org.apache.catalina.connector.Connector.start(Connector.java:1132)
> at 
> org.apache.catalina.core.StandardService.start(StandardService.java:457)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
> SEVERE: Catalina.start:
> LifecycleException:  service.getName(): "Catalina";  Protocol handler
> start failed: java.lang.Exception: Socket bind failed: [730048] Only
> one usage of each socket address (protocol/network address/port)  is
> normally permitted.
> at org.apache.catalina.connector.Connector.start(Connector.java:1139)
> at 
> org.apache.catalina.core.StandardService.start(StandardService.java:457)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> 25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
>
> I guess there must be something else using port 80? but I can't see it
> ( tried netstat).
>
> I am running W2000, tomcat 6.
>
> Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
> playing with settings, but am getting nowhere.
>
> Any suggestions?
>
> Thanks,
>
> John
>
> -
> 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]



   
-
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

RE: problem switching to port 80

2007-04-25 Thread Propes, Barry L
likely IIS by default! The WWW publishing service.

-Original Message-
From: John Pedersen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 25, 2007 9:55 AM
To: users@tomcat.apache.org
Subject: problem switching to port 80


Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)
at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

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



Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Sebastiaan van Erk

Hi,

I have the following problem with Comet. I have a long request, and I 
asynchronously write data to the output stream of the response while the 
request is between the BEGIN and END/ERROR events. However, the writes 
do NOT occur while IN a READ request, but are triggered by other events 
on the server side.


When I send a lot of data, the send buffer fills up, and the channel 
needs to be registered with the poller for the OP_WRITE event. However, 
this does not happen. In NioBlockingSelector line 69, there is the 
following code that is supposed to register the channel for OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 1 
(and not 0), therefore the event is never registered. 60 seconds later I 
get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just to be sure.

Regards,
Sebastiaan



-
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: problem switching to port 80

2007-04-25 Thread Len Popp

Also check if something is using the other ports that Tomcat uses -
the shutdown port, SSL port, other connectors (e.g. AJP), clustering
ports. They're all found in server.xml (but some are probably
commented out).
--
Len

On 4/25/07, John Pedersen <[EMAIL PROTECTED]> wrote:

Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)
at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

-
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: problem switching to port 80

2007-04-25 Thread Caldarale, Charles R
> From: John Pedersen [mailto:[EMAIL PROTECTED] 
> Subject: problem switching to port 80
> 
> I guess there must be something else using port 80? but I can't see it
> ( tried netstat).

Use "netstat -an"; plain netstat without options may not show
everything.

The problem may not be port 80, since Tomcat by default uses three ports
(8005 and 8009 in addition to the HTTP connector).

The restriction about ports less than 1024 is normally an issue only on
Linux/UNIX systems, not Windows.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Application startup error - TOMCAT 5.0.28 / 1.5

2007-04-25 Thread Dwight Farris
Hello All,
One of my webApps is throwing the following exception;

java.lang.ClassFormatError: 
Illegal UTF8 string in constant pool in class file
org/hibernate/hql/ast/ErrorCounter

I have checked the UTF8 strings; nothing has changed and the app has been
running without issue.

Any ideas are greatly appreciated

Dwight 


-
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: Memory Leak with Comet

2007-04-25 Thread Rémy Maucherat

On 4/25/07, Reich, Matthias <[EMAIL PROTECTED]> wrote:

So far, I have the feeling that I am the only one who has seen these memory 
leaks with asynchronous Comet responses.

I tried with a number of variations, e.g.
- let the browser wait for 500 millis before sending the next poll after 
receiving a result
- keep the events queued in the serverfor at least 500 millis before sending 
the response
- modify synchronization and the places where I invoke event.close()
- tried with connector attribute maxKeepAliveRequests="-1" and 
maxKeepAliveRequests="2"
but the effect is always the same.

Thus, I doubt that it is really 'wrong' usage of the interfaces, and others 
should have seen similar effects.

Has anyone out there run an application with browsers as clients and with 
asynchronous responses for a longer time without loosing memory?

Or am I the only one so far working on such a scenario?


Processors are only recycled when the IO layer gets an event (read,
disconnect, timeout), and if:
- the event is a non timeout error
- the event is closed by the servlet
- the event has been closed asynchronously

If the client is sitting there without sending any data (if it
disconnects, it becomes either a read event or an error/disconnect
event, so it's the same), then you have to wait for the timeout (which
can be set per event with the NIO connector - this is not doable at
this time for the APR connector).

Rémy

-
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: Application startup error - TOMCAT 5.0.28 / 1.5

2007-04-25 Thread Propes, Barry L
almost sounds like you have to use the equivalent for a "<" like a &lquo; or 
some similar type marking in the proper xml file.
Might look into it, even though nothing changed as you said.


-Original Message-
From: Dwight Farris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 25, 2007 10:11 AM
To: 'Tomcat Users List'
Subject: Application startup error - TOMCAT 5.0.28 / 1.5


Hello All,
One of my webApps is throwing the following exception;

java.lang.ClassFormatError: 
Illegal UTF8 string in constant pool in class file
org/hibernate/hql/ast/ErrorCounter

I have checked the UTF8 strings; nothing has changed and the app has been
running without issue.

Any ideas are greatly appreciated

Dwight 


-
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: Application startup error - TOMCAT 5.0.28 / 1.5

2007-04-25 Thread Dwight Farris
Thanks for your quick response, Barry; I will take a look into that.

Dwight 
-Original Message-
From: Propes, Barry L [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 8:19 AM
To: Tomcat Users List
Subject: RE: Application startup error - TOMCAT 5.0.28 / 1.5

almost sounds like you have to use the equivalent for a "<" like a &lquo; or
some similar type marking in the proper xml file.
Might look into it, even though nothing changed as you said.


-Original Message-
From: Dwight Farris [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 25, 2007 10:11 AM
To: 'Tomcat Users List'
Subject: Application startup error - TOMCAT 5.0.28 / 1.5


Hello All,
One of my webApps is throwing the following exception;

java.lang.ClassFormatError: 
Illegal UTF8 string in constant pool in class file
org/hibernate/hql/ast/ErrorCounter

I have checked the UTF8 strings; nothing has changed and the app has been
running without issue.

Any ideas are greatly appreciated

Dwight 


-
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: problem switching to port 80

2007-04-25 Thread John Pedersen

netstat -an with Tomcat stopped:


Proto  Local Address  Foreign AddressState
TCP0.0.0.0:1350.0.0.0:0  LISTENING
TCP0.0.0.0:4450.0.0.0:0  LISTENING
TCP0.0.0.0:1025   0.0.0.0:0  LISTENING
TCP0.0.0.0:3260   0.0.0.0:0  LISTENING
TCP0.0.0.0:3261   0.0.0.0:0  LISTENING
TCP0.0.0.0:3306   0.0.0.0:0  LISTENING
TCP127.0.0.1:1033 127.0.0.1:1034 ESTABLISHED
TCP127.0.0.1:1034 127.0.0.1:1033 ESTABLISHED
TCP127.0.0.1:1095 127.0.0.1:1096 ESTABLISHED
TCP127.0.0.1:1096 127.0.0.1:1095 ESTABLISHED
TCP192.168.1.2:1390.0.0.0:0  LISTENING
TCP192.168.1.2:2995   209.85.137.19:80   ESTABLISHED
TCP192.168.1.2:2997   209.85.137.19:80   ESTABLISHED
TCP192.168.1.2:4080   209.85.137.19:80   ESTABLISHED
TCP192.168.1.2:4093   192.168.1.1:80 CLOSE_WAIT
TCP192.168.1.2:4094   192.168.1.1:80 CLOSE_WAIT
UDP0.0.0.0:445*:*
UDP192.168.1.2:137*:*
UDP192.168.1.2:138*:*
UDP192.168.1.2:500*:*
UDP192.168.1.2:4500   *:*

I don't see any problem here - but then I am not that sure what I am looking at!

-
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: Memory Leak with Comet

2007-04-25 Thread Filip Hanik - Dev Lists

Do you have a small test case,
if nothing else, your connections should eventually timeout and that 
should recycle the processors.

As long as the comet connection is active, the processor is spoken for.

Filip

Reich, Matthias wrote:

So far, I have the feeling that I am the only one who has seen these memory 
leaks with asynchronous Comet responses.

I tried with a number of variations, e.g.
- let the browser wait for 500 millis before sending the next poll after 
receiving a result
- keep the events queued in the serverfor at least 500 millis before sending 
the response
- modify synchronization and the places where I invoke event.close()
- tried with connector attribute maxKeepAliveRequests="-1" and 
maxKeepAliveRequests="2"
but the effect is always the same.

Thus, I doubt that it is really 'wrong' usage of the interfaces, and others 
should have seen similar effects.

Has anyone out there run an application with browsers as clients and with 
asynchronous responses for a longer time without loosing memory?

Or am I the only one so far working on such a scenario?

Matthias


-Original Message-
From: Rémy Maucherat [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 3:11 PM

To: Tomcat Users List
Subject: Re: Memory Leak with Comet

On 4/25/07, Reich, Matthias <[EMAIL PROTECTED]> wrote:
  

First I ran Tomcat with a single connector with attribute maxThreads=20,
and started it with -Xmx10m.
In the dump I saw 103 instances of class
org.apache.coyote.http11.Http11AprProcessor and the same number of all
the attached objects like Request, Response ...



This basically means what I said: the connections and their associated
processors are never properly closed and recycled for some reason.

Rémy

-
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: problem switching to port 80

2007-04-25 Thread John Pedersen

Not sure what happened - but it is working now. Now I just have to try
to find out if it was something I switched off, or someone else
changing the networks settings.

Thanks for the fast response guys.

If I get a definite answer to what went wrong, I will post it for
future reference.

John

-
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: problem switching to port 80

2007-04-25 Thread David Smith
My personal preference for ferreting out port problems in Windows is 
TCPView 
(http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx).  
It'll offer up a fair amount of info on the process that has the 
conflicting port.


--David

John Pedersen wrote:


Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149) 


at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

-
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: My first JAAS implementation. A few questions.

2007-04-25 Thread shahab

Hi:

I have similar issue. Would you know if we need to save trhe Subject in
HttpSession?

Otherwise, how would the context get the Subject as follows - 
Subject = <%= Subject.getSubject(AccessController.getContext()) %>

thanx
Shahab


Mark Benussi wrote:
> 
> I am implementing my first JAAS implementation and have some
> problems/questions.
> 
> Firstly my commit method of my LoginModule does the following (User and
> Role
> both implement Principal)
> 
> // Create a new User Principal with the user name retrieved from the
> NameCallback
> User user = new User(username);
> // Add the principal to the subject
> subject.getPrincipals().add(user);
> 
> for (int i = 0; i < roles.length; i++) {
>   // Iterate the role names retrieved from the database lookup
>String roleName = roles[i];
>// Create a new Role Principal with the role name
>   Role role = new Role(roleName);
>   // Add it to the public credentials to see if it works
>   subject.getPublicCredentials().add(role);
>   // Add it to the private credentials to see if it works
>   subject.getPrivateCredentials().add(role);
> }
> return true;
> 
> In the JSP that the application returns to after doing form based
> authentication the following occurs
> 
> Subject = <%= Subject.getSubject(AccessController.getContext()) %>
> Remote User = <%= request.getRemoteUser() %>
> User Prinicipal = <%= request.getUserPrincipal() %>
> 
> But this produces
> 
> Subject = null
> Remote User = administrator
> User Prinicipal = GenericPrincipal[administrator()]
> Why is the subject null please?
> 
> The request.isUserInRole() methods for the role names I added to the
> subject
> also return false... has anyone got some helpful ideas please?
> 
> If more source is needed I can gladly provide it if will help
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/My-first-JAAS-implementation.-A-few-questions.-tf207803.html#a10183578
Sent from the Tomcat - User mailing list archive 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: Memory Leak with Comet

2007-04-25 Thread Rémy Maucherat

On 4/25/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

Do you have a small test case,
if nothing else, your connections should eventually timeout and that
should recycle the processors.
As long as the comet connection is active, the processor is spoken for.


He submitted a test webapp that generated a full response
asynchronously, but I don't see anything which wouldn't cause the
client to just "sit there" after the response is sent. As a result, I
don't see any way to get an IO event (unless the client disconnects -
which happens if there's a Connection: close header -, the client
sends a subsequent request, or a timeout occurs).

Rémy

-
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: Application startup error - TOMCAT 5.0.28 / 1.5

2007-04-25 Thread Rashmi Rubdi

On 4/25/07, Dwight Farris <[EMAIL PROTECTED]> wrote:

Hello All,
One of my webApps is throwing the following exception;

java.lang.ClassFormatError:
Illegal UTF8 string in constant pool in class file
org/hibernate/hql/ast/ErrorCounter

I have checked the UTF8 strings; nothing has changed and the app has been
running without issue.



It could also be the UTF-8 Byte Order Mark characters , they are
normally not visible in plain text editors but can be spotted in Hex
editors.




Any ideas are greatly appreciated

Dwight


-
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: Organizing WEB-INF/lib

2007-04-25 Thread Rashmi Rubdi

On 4/25/07, JavierL <[EMAIL PROTECTED]> wrote:



Hi

I've a an Axis war where a lot of people publish applications and then, lib
directory is caotic with a lot of jar files. Each time somebody delete your
webservice application, he/she can't delete related jar files because
ignores if somebody else is using it.

I want to arrange and organize and then I wonder if there is a way to make
subfolders inside WEB-INF/lib to allow each application to place its own
related jars and keep root WEB-INF/lib just as a "commons" folder where
place only shared jars.


Is this possible ?



From my experience, adding Jars for different apps in the same lib

folder will cause conflicts and duplicates, especially if one person
is using a JAR for one version and another is using a different
version.

However, you can have different projects with each project having it's
own WEB-INF/lib folder and it's own JAR files.



Any idea/clue welcome...


Thanks in advance

J



Regards
Rashmi

-
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 to set JAAS Subject in HTTPSession

2007-04-25 Thread Rashmi Rubdi

Hi shahab,

Here's : http://forum.java.sun.com/category.jspa?categoryID=15 for
JAAS related questions.

To set any object into HTTP Session use the setAttribute method:
http://java.sun.com/javaee/5/docs/api/ , and removeAttribute.

Regards
-Rashmi

On 4/25/07, shahab <[EMAIL PROTECTED]> wrote:


Hi:

I would need help with the following -
I am trying to implement JAAS authentication using struts2. I have
implemented the following flow -
user request -> struts action -> login() -> loginModule (implements
LoginModule)

this login module validates userid, password and  in the commit(), it
creates a Principal and adds the principal in the Subject.

My qn is how do I set this Subject in the HttpSession so that I can retrieve
it later, like below -
HttpServletRequest request = ServletActionContext.getRequest();
Principal principal = request.getUserPrincipal();


Please help.
thanx
Shahahb
--


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



Building from source

2007-04-25 Thread Gross, Keith
I was trying to follow the direction from the web site for building Tomcat
5.5 from source.  I was wondering if anybody has done a from scratch build
using those instructions?  I found right off the build.xml
(http://tomcat.apache.org/tomcat-5.5-doc/build.xml) linked from that page
(http://tomcat.apache.org/tomcat-5.5-doc/building.html) failed for me when
checking out the source. To get the check out to work I had to change the
ant exec from :


  
  
  


To 


  
  
  


The change is in the 3rd  tag.  The original caused the checkout to
create a sub-directory named tc5.5.x which had the build directory in it.
So you got something like this

\tomcat-build
\build.xml
\tc5.5.x
\.svn
\build
\connectors
\container
\jasper
\servletapi

It seemed the script was expecting 

\tomcat-build
\build.xml
\.svn
\build
\connectors
\container
\jasper
\servletapi

By changing the 3rd arg I got this structure and the build proceeded for
quite some time.  It then finally failed with the following:

build-static:
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\WEB-INF
 [copy] Copying 2 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev
 [copy] Copying 6 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\catalina\funcspecs
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\architecture
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
 [copy] Copying 10 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Transforming into D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Processing D:\Tomcat\New Folder\container\webapps\docs\apr.xml
to D:\Tomcat\New Folder\build\build\webapps\tomcat-docs
\printer\apr.html
[style] Loading stylesheet D:\Tomcat\New
Folder\container\webapps\docs\tomcat-docs.xsl
[style] : Fatal Error! Failure reading
file:///D:/Tomcat/New%20Folder/container/webapps/docs/apr.xml Cause:
java.net.Malformed
URLException: no protocol: project.xml
[style] Failed to process D:\Tomcat\New
Folder\container\webapps\docs\apr.xml

BUILD FAILED
D:\Tomcat\New Folder\build.xml:51: The following error occurred while
executing this line:
D:\Tomcat\New Folder\build\build.xml:793: The following error occurred while
executing this line:
D:\Tomcat\New Folder\container\webapps\docs\build.xml:88: Fatal error during
transformation

Total time: 11 minutes 51 seconds

Here I'm stuck at the moment.  It would appear to be complaining about the
doctype in this file not being correct but that's the way it's declared in
all the files.  Any ideas how to correct 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: Memory Leak with Comet

2007-04-25 Thread Filip Hanik - Dev Lists

Rémy Maucherat wrote:

On 4/25/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

Do you have a small test case,
if nothing else, your connections should eventually timeout and that
should recycle the processors.
As long as the comet connection is active, the processor is spoken for.


He submitted a test webapp that generated a full response
asynchronously, but I don't see anything which wouldn't cause the
client to just "sit there" after the response is sent. As a result, I
don't see any way to get an IO event (unless the client disconnects -
which happens if there's a Connection: close header -, the client
sends a subsequent request, or a timeout occurs).
then it's normal behavior, he'll just have to wait for a timeout or the 
client will disconnect


Filip


Rémy

-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Filip Hanik - Dev Lists

definitely a bug, I will work on a fix right away.
Filip

Sebastiaan van Erk wrote:

Hi,

I have the following problem with Comet. I have a long request, and I 
asynchronously write data to the output stream of the response while 
the request is between the BEGIN and END/ERROR events. However, the 
writes do NOT occur while IN a READ request, but are triggered by 
other events on the server side.


When I send a lot of data, the send buffer fills up, and the channel 
needs to be registered with the poller for the OP_WRITE event. 
However, this does not happen. In NioBlockingSelector line 69, there 
is the following code that is supposed to register the channel for 
OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 1 
(and not 0), therefore the event is never registered. 60 seconds later 
I get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just to be 
sure.


Regards,
Sebastiaan



-
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: Memory Leak with Comet

2007-04-25 Thread Rémy Maucherat

On 4/25/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

then it's normal behavior, he'll just have to wait for a timeout or the
client will disconnect


I don't know for sure, of course, but it's my theory at the moment.

Rémy

-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Filip Hanik - Dev Lists

Sebastian,
I have checked in a fix to SVN. You can also work around the problem by 
not using the shared selector by adding

-Dorg.apache.tomcat.util.net.NioSelectorShared=false
to your command line

Filip

Filip Hanik - Dev Lists wrote:

definitely a bug, I will work on a fix right away.
Filip

Sebastiaan van Erk wrote:

Hi,

I have the following problem with Comet. I have a long request, and I 
asynchronously write data to the output stream of the response while 
the request is between the BEGIN and END/ERROR events. However, the 
writes do NOT occur while IN a READ request, but are triggered by 
other events on the server side.


When I send a lot of data, the send buffer fills up, and the channel 
needs to be registered with the poller for the OP_WRITE event. 
However, this does not happen. In NioBlockingSelector line 69, there 
is the following code that is supposed to register the channel for 
OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 1 
(and not 0), therefore the event is never registered. 60 seconds 
later I get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just to 
be sure.


Regards,
Sebastiaan



-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Sebastiaan van Erk

Hi,

Thanks for the quick action. I'll test the new version right away. :-)

Regards,
Sebastiaan

Filip Hanik - Dev Lists wrote:

Sebastian,
I have checked in a fix to SVN. You can also work around the problem 
by not using the shared selector by adding

-Dorg.apache.tomcat.util.net.NioSelectorShared=false
to your command line

Filip

Filip Hanik - Dev Lists wrote:

definitely a bug, I will work on a fix right away.
Filip

Sebastiaan van Erk wrote:

Hi,

I have the following problem with Comet. I have a long request, and 
I asynchronously write data to the output stream of the response 
while the request is between the BEGIN and END/ERROR events. 
However, the writes do NOT occur while IN a READ request, but are 
triggered by other events on the server side.


When I send a lot of data, the send buffer fills up, and the channel 
needs to be registered with the poller for the OP_WRITE event. 
However, this does not happen. In NioBlockingSelector line 69, there 
is the following code that is supposed to register the channel for 
OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 1 
(and not 0), therefore the event is never registered. 60 seconds 
later I get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just to 
be sure.


Regards,
Sebastiaan



-
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: Building from source

2007-04-25 Thread Filip Hanik - Dev Lists
1. dont use folders with spaces, in theory they should work, in 
practice, who knows

2. building is easier than that, follow these steps
  a) svn co http://svn.apache.org/repos/asf/tomcat/current/tc5.5.x
  b) cd tc5.5.x
  c) edit build.properties.default (the base.path parameter is where it 
will download dependencies too)

  d) ant download
  e) ant (or ant release, but this requires additional stuff)


Filip
Gross, Keith wrote:

I was trying to follow the direction from the web site for building Tomcat
5.5 from source.  I was wondering if anybody has done a from scratch build
using those instructions?  I found right off the build.xml
(http://tomcat.apache.org/tomcat-5.5-doc/build.xml) linked from that page
(http://tomcat.apache.org/tomcat-5.5-doc/building.html) failed for me when
checking out the source. To get the check out to work I had to change the
ant exec from :


  
  
  


To 



  
  
  


The change is in the 3rd  tag.  The original caused the checkout to
create a sub-directory named tc5.5.x which had the build directory in it.
So you got something like this

\tomcat-build
\build.xml
\tc5.5.x
\.svn
\build
\connectors
\container
\jasper
\servletapi

It seemed the script was expecting 


\tomcat-build
\build.xml
\.svn
\build
\connectors
\container
\jasper
\servletapi

By changing the 3rd arg I got this structure and the build proceeded for
quite some time.  It then finally failed with the following:

build-static:
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\WEB-INF
 [copy] Copying 2 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev
 [copy] Copying 6 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
 [copy] Copying 1 file to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\appdev\sample
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\catalina\funcspecs
 [copy] Copying 4 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\architecture
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
 [copy] Copying 10 files to D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\images
[mkdir] Created dir: D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Transforming into D:\Tomcat\New
Folder\build\build\webapps\tomcat-docs\printer
[style] Processing D:\Tomcat\New Folder\container\webapps\docs\apr.xml
to D:\Tomcat\New Folder\build\build\webapps\tomcat-docs
\printer\apr.html
[style] Loading stylesheet D:\Tomcat\New
Folder\container\webapps\docs\tomcat-docs.xsl
[style] : Fatal Error! Failure reading
file:///D:/Tomcat/New%20Folder/container/webapps/docs/apr.xml Cause:
java.net.Malformed
URLException: no protocol: project.xml
[style] Failed to process D:\Tomcat\New
Folder\container\webapps\docs\apr.xml

BUILD FAILED
D:\Tomcat\New Folder\build.xml:51: The following error occurred while
executing this line:
D:\Tomcat\New Folder\build\build.xml:793: The following error occurred while
executing this line:
D:\Tomcat\New Folder\container\webapps\docs\build.xml:88: Fatal error during
transformation

Total time: 11 minutes 51 seconds

Here I'm stuck at the moment.  It would appear to be complaining about the
doctype in this file not being correct but that's the way it's declared in
all the files.  Any ideas how to correct 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]



  



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



Change response header

2007-04-25 Thread Dummy
When I make a request to my local server, I always receive a response header 
like this:
HTTP/1.1 200 

Server: Apache-Coyote/1.1

Content-Type: anything I Want

Content-Language: anything I Want

Content-Length: anything I Want

Date: Wed, 25 Apr 2007 18:07:18 GMT

Connection: close

I can change the info in almost attributes by set the response in servlet but 
not with Server attribute. Althought I can make another Server attribute, but 
that time there will be 2 Server attributes in the response header. How can I 
change the info in Server attribute from Apache-Coyote/1.1 to MyServer for 
example( config somewhere or code something in my servlet)? Thanks for any 
responding.

Dummy


Re: Change response header

2007-04-25 Thread David Smith
And your tomcat version?  In 5.5+ you should be able to set the server 
attribute of your connector.  See the docs on the tomcat website for 
further details.


--David

Dummy wrote:


When I make a request to my local server, I always receive a response header 
like this:
HTTP/1.1 200 


Server: Apache-Coyote/1.1

Content-Type: anything I Want

Content-Language: anything I Want

Content-Length: anything I Want

Date: Wed, 25 Apr 2007 18:07:18 GMT

Connection: close

I can change the info in almost attributes by set the response in servlet but 
not with Server attribute. Althought I can make another Server attribute, but 
that time there will be 2 Server attributes in the response header. How can I 
change the info in Server attribute from Apache-Coyote/1.1 to MyServer for 
example( config somewhere or code something in my servlet)? Thanks for any 
responding.

Dummy

 




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



comet events and connections

2007-04-25 Thread Daniel Doubleday

Hi this post is a follow up from
http://issues.apache.org/bugzilla/show_bug.cgi?id=42198 where this post does
not belong.

I want to find out if my understanding of the comet api in tomcat is right
concerning how connections are handled and event are triggered. I have a
very simple test webapp which streams a couple of messages to a browser via
XHR. The pseudo code of the comet servlet looks looks like this:

switch (event)
case BEGIN:
  start worker thread which will post messages up the response and call
event.close when finished
 
case END:
case ERROR:
  signal worker thread that it must stop sending messages

case READ:
throw IOException // expect that ERROR is triggered

Now when opening the streaming connection I can specify if the connection
should be kept alive or closed after the request has finished. This done be
setting the response header "Connection: close".

When using a Keep-Alive connection there is no instant END event triggered
when event.close() is called. Thats because the connection itself is not
closed. After a while when the keep alive connection times out the client
will release it and the END event will be triggered.

When not using Keep Alive the end event is triggered instantly after the
event.close() method is called. The response has been committed at this time
and will be recycled after this method call.

The problem is that the comet event object is in two different states
although the same method has been called.

On one hand, when the underlying objects have been recycled a call to
method.close() yields a NullPointerException and on the other hand, when the
response has been closed but the connection is still there an asynch process
can continue to write to the response stream without being notified that
it's writing nowhere.

In my opinion in should be the other way round:

I don't think that a event.close() call should throw a NPE when the event is
already closed. But I would rather catch an exception when I am writing to
response object that has been closed.

Maybe I am getting something wrong, but I think that the api should rather
reflect a request model, where the end event is triggered when the response
is closed. Now it seems that it more reflects the connection model. I am
sure that one can live with it as it is though.

Or maybe I'm just wrong?

Cheers, Daniel

-- 
View this message in context: 
http://www.nabble.com/comet-events-and-connections-tf3647567.html#a10187852
Sent from the Tomcat - User mailing list archive 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]



(newbie) Why tomcat needs network on startup?

2007-04-25 Thread ypomonh

Why does Tomcat need network connectivity on startup. Can't I use it on a 
machine that is not connected on the network (localhost)?


-
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: Re: (newbie) Why tomcat needs network on startup?

2007-04-25 Thread ypomonh

.. but it seems like it is searching for DNS server on startup :-/

> --=_Part_140061_20812969.1177528468191
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
> 
> It doesn't need network connectivity (at least not as far as i know). Most
> developers use it within a localhost setting. If you're on windows and
> you're getting a prompt about a process wanting to open a port, that is just
> a network security issue, it doesn't mean tomcat requires internet access.
> 
> On 4/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> >
> > Why does Tomcat need network connectivity on startup. Can't I use it on a
> > machine that is not connected on the network (localhost)?
> >
> >
> > -
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> --
> "talk trash and carry a small stick."
> PAUL KRUGMAN (NYT)
> 
> --=_Part_140061_20812969.1177528468191--



-
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: (newbie) Why tomcat needs network on startup?

2007-04-25 Thread David Smith



I'm not entirely sure, but it seems like I saw something once implying 
some OS's (I'm thinking MS) disable the localhost when there's no active 
network interface.  Don't think there's any reason why tomcat should be 
prevented from binding to localhost if it's available.


--David


EDMOND KEMOKAI wrote:

It doesn't need network connectivity (at least not as far as i know). 
Most

developers use it within a localhost setting. If you're on windows and
you're getting a prompt about a process wanting to open a port, that 
is just
a network security issue, it doesn't mean tomcat requires internet 
access.


On 4/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:




Why does Tomcat need network connectivity on startup. Can't I use it 
on a

machine that is not connected on the network (localhost)?


-
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: (newbie) Why tomcat needs network on startup?

2007-04-25 Thread EDMOND KEMOKAI

It doesn't need network connectivity (at least not as far as i know). Most
developers use it within a localhost setting. If you're on windows and
you're getting a prompt about a process wanting to open a port, that is just
a network security issue, it doesn't mean tomcat requires internet access.

On 4/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Why does Tomcat need network connectivity on startup. Can't I use it on a
machine that is not connected on the network (localhost)?


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





--
"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)


Re: comet events and connections

2007-04-25 Thread Filip Hanik - Dev Lists

Daniel Doubleday wrote:

Hi this post is a follow up from
http://issues.apache.org/bugzilla/show_bug.cgi?id=42198 where this post does
not belong.

I want to find out if my understanding of the comet api in tomcat is right
concerning how connections are handled and event are triggered. I have a
very simple test webapp which streams a couple of messages to a browser via
XHR. The pseudo code of the comet servlet looks looks like this:

switch (event)
case BEGIN:
  start worker thread which will post messages up the response and call
event.close when finished
 
case END:

case ERROR:
  signal worker thread that it must stop sending messages

case READ:
throw IOException // expect that ERROR is triggered

Now when opening the streaming connection I can specify if the connection
should be kept alive or closed after the request has finished. This done be
setting the response header "Connection: close".
  

Correct.

When using a Keep-Alive connection there is no instant END event triggered
when event.close() is called. Thats because the connection itself is not
closed. After a while when the keep alive connection times out the client
will release it and the END event will be triggered.
  
Depends, you can receive an ERROR or a READ event. The NIO connector 
detects the disconnect as a READ event.
in your READ you must do request.getInputStream().read(), and you should 
check for -1 as a return value.



When not using Keep Alive the end event is triggered instantly after the
event.close() method is called. The response has been committed at this time
and will be recycled after this method call.
  
In your code example, doing a "close" in the BEGIN event, you connection 
is never marked as a Comet in the underlying IO layer.



The problem is that the comet event object is in two different states
although the same method has been called.

On one hand, when the underlying objects have been recycled a call to
method.close() yields a NullPointerException and on the other hand, when the
response has been closed but the connection is still there an asynch process
can continue to write to the response stream without being notified that
it's writing nowhere.
  
Its your responsibility to keep track of references. You can turn off 
Tomcat's reuse of facade objects, see a post earlier today or yesterday.

In my opinion in should be the other way round:

I don't think that a event.close() call should throw a NPE when the event is
already closed. But I would rather catch an exception when I am writing to
response object that has been closed.
  

that is possible to do, do you have the stack trace of the NPE?

Maybe I am getting something wrong, but I think that the api should rather
reflect a request model, where the end event is triggered when the response
is closed. Now it seems that it more reflects the connection model. I am
sure that one can live with it as it is though.
  

not sure I understand this and what you are trying to get at.
Filip

Or maybe I'm just wrong?

Cheers, Daniel

  



-
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: Organizing WEB-INF/lib

2007-04-25 Thread JavierL


Rashmi Rubdi-2 wrote:
> 
> 
> From my experience, adding Jars for different apps in the same lib
> folder will cause conflicts and duplicates, especially if one person
> is using a JAR for one version and another is using a different
> version.
> 
> However, you can have different projects with each project having it's
> own WEB-INF/lib folder and it's own JAR files.
> 


Thanks for your reply.

I understand what you said and it's what I want to avoid.

Axis works as I said. It is a war application where you place the
applications you want to offer as web services so everybody can deploy
his/her application with its jar dependencies in WEB-INF/lib.

What I want is to make a folder inside WEB-INF/lib for each application
where to place its jars. If the application use  the same jar as another,
move the installed and the new one to lib folder. Is the only way I can
imagine to keep this caos in some order.

Your recommendation to place one war for application is ok for common web
application, but to place one axis war instance for each webservice is
totally unusable.

J



-- 
View this message in context: 
http://www.nabble.com/Organizing-WEB-INF-lib-tf3643789.html#a10188375
Sent from the Tomcat - User mailing list archive 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: (newbie) Why tomcat needs network on startup?

2007-04-25 Thread Caldarale, Charles R
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Subject: Re: (newbie) Why tomcat needs network on startup?
> 
> Don't think there's any reason why tomcat should be 
> prevented from binding to localhost if it's available.

By default Tomcat doesn't bind to localhost, it uses 0.0.0.0 - all IP
addresses.  If there is no TCP/IP stack on the system in question, it
has nothing to attach to.

> From:  [EMAIL PROTECTED]
> Subject: Re: (newbie) Why tomcat needs network on startup?
>
> .. but it seems like it is searching for DNS server on startup :-/

I just ran a Wireshark trace for Tomcat startup and it made no network
requests during that period.  However, I do have the enableLookups
attribute for each  element in server.xml set to false; if
you don't, that may change things.  If you find that some DNS lookups
are being made by Tomcat, you could define those names in your hosts
file to avoid making server requests.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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: problem switching to port 80

2007-04-25 Thread Johnny Kewl

Type netstat -noa

It will give you the PID...
Then Ctrl Alt Delete -> Process's and View -> Select Tab PID
Then you can match up the application on port 80 exactly

Bet its SKYPE... ;)




- Original Message - 
From: "John Pedersen" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, April 25, 2007 4:55 PM
Subject: problem switching to port 80



Hi,

I have an app running fine on port 8080, but nothing works when I
switch to port 80 -

in server.xml, changing:



to



I get this error message:

SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [730048] Only one usage of
each socket address (protocol/network address/port)  is normally
permitted.
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:608)
at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:712)
at 
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:149)

at org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException:  service.getName(): "Catalina";  Protocol handler
start failed: java.lang.Exception: Socket bind failed: [730048] Only
one usage of each socket address (protocol/network address/port)  is
normally permitted.
at org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:457)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
25-Apr-2007 15:50:33 org.apache.catalina.startup.Catalina start

I guess there must be something else using port 80? but I can't see it
( tried netstat).

I am running W2000, tomcat 6.

Maybe it is my wireless setup ( BT voyager 2100 ) - I have been
playing with settings, but am getting nowhere.

Any suggestions?

Thanks,

John

-
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: Organizing WEB-INF/lib

2007-04-25 Thread Rashmi Rubdi

Javier,

I don't know much about Webservices and Axis in particular, but at one
time I did download the Axis distribution.

In the lib folder of the Axis distribution there are a few JAR files
axis.jar, wsdl4j-1.5.1.jar etc.

Normally, when I write multiple projects that use JAR files from
different applications like say for example JSTL, Saxon etc, I just
copy the JAR files into the relevant project's lib folder.

With the limited knowledge on Axis I have, I don't think you need the
entire Axis WAR file to enable webservices in other projects, you'll
only need the JAR files.

You could also check with the Axis User Mailing List for alternatives
ways to configure multiple projects to use web services.

-Regards
Rashmi

On 4/25/07, JavierL <[EMAIL PROTECTED]> wrote:



Rashmi Rubdi-2 wrote:
>
>
> From my experience, adding Jars for different apps in the same lib
> folder will cause conflicts and duplicates, especially if one person
> is using a JAR for one version and another is using a different
> version.
>
> However, you can have different projects with each project having it's
> own WEB-INF/lib folder and it's own JAR files.
>


Thanks for your reply.

I understand what you said and it's what I want to avoid.

Axis works as I said. It is a war application where you place the
applications you want to offer as web services so everybody can deploy
his/her application with its jar dependencies in WEB-INF/lib.

What I want is to make a folder inside WEB-INF/lib for each application
where to place its jars. If the application use  the same jar as another,
move the installed and the new one to lib folder. Is the only way I can
imagine to keep this caos in some order.

Your recommendation to place one war for application is ok for common web
application, but to place one axis war instance for each webservice is
totally unusable.

J


-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Sebastiaan van Erk

Hi,

The fixes seem to work well, thanks again! :-)

Regards,
Sebastiaan

Sebastiaan van Erk wrote:

Hi,

Thanks for the quick action. I'll test the new version right away. :-)

Regards,
Sebastiaan

Filip Hanik - Dev Lists wrote:

Sebastian,
I have checked in a fix to SVN. You can also work around the problem 
by not using the shared selector by adding

-Dorg.apache.tomcat.util.net.NioSelectorShared=false
to your command line

Filip

Filip Hanik - Dev Lists wrote:

definitely a bug, I will work on a fix right away.
Filip

Sebastiaan van Erk wrote:

Hi,

I have the following problem with Comet. I have a long request, and 
I asynchronously write data to the output stream of the response 
while the request is between the BEGIN and END/ERROR events. 
However, the writes do NOT occur while IN a READ request, but are 
triggered by other events on the server side.


When I send a lot of data, the send buffer fills up, and the 
channel needs to be registered with the poller for the OP_WRITE 
event. However, this does not happen. In NioBlockingSelector line 
69, there is the following code that is supposed to register the 
channel for OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 
1 (and not 0), therefore the event is never registered. 60 seconds 
later I get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just to 
be sure.


Regards,
Sebastiaan



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



-
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: comet events and connections

2007-04-25 Thread Daniel Doubleday

>> I don't think that a event.close() call should throw a NPE when the event
is
>> already closed. But I would rather catch an exception when I am writing
>> to
>> response object that has been closed.
>   
> that is possible to do, do you have the stack trace of the NPE?

Here is the stack trace:

Exception in thread "Thread-17" java.lang.NullPointerException
at
org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:84)
at
com.mrtattle.tcniotest.CometServlet$Transport.close(CometServlet.java:42)
at com.mrtattle.tcniotest.CometServlet$1.run(CometServlet.java:117)
at java.lang.Thread.run(Thread.java:613)

>> Maybe I am getting something wrong, but I think that the api should
>> rather
>> reflect a request model, where the end event is triggered when the
>> response
>> is closed. Now it seems that it more reflects the connection model. I am
>> sure that one can live with it as it is though.
>   
> not sure I understand this and what you are trying to get at.

I think that the comet api represents a socket connection. The event life
cycle is bound to the connection life cycle. You get an END (or ERROR etc)
when the connection gets closed. But when you are writing something that
still looks like a servlet you would expect that the event life cycle is
bound to the request / response model. As soon as the response is closed you
would expect an END event.  


Filip Hanik - Dev Lists wrote:
> 
> Daniel Doubleday wrote:
>> Hi this post is a follow up from
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=42198 where this post
>> does
>> not belong.
>>
> ...
> not sure I understand this and what you are trying to get at.
> Filip
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/comet-events-and-connections-tf3647567.html#a10190519
Sent from the Tomcat - User mailing list archive 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: comet events and connections

2007-04-25 Thread Rémy Maucherat

On 4/25/07, Daniel Doubleday <[EMAIL PROTECTED]> wrote:

Here is the stack trace:

Exception in thread "Thread-17" java.lang.NullPointerException
at
org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:84)
at
com.mrtattle.tcniotest.CometServlet$Transport.close(CometServlet.java:42)
at com.mrtattle.tcniotest.CometServlet$1.run(CometServlet.java:117)
at java.lang.Thread.run(Thread.java:613)


This means (quite predictably) the request is done and has been
recycled, and you should probably add syncs here and there.


I think that the comet api represents a socket connection. The event life
cycle is bound to the connection life cycle. You get an END (or ERROR etc)
when the connection gets closed. But when you are writing something that
still looks like a servlet you would expect that the event life cycle is
bound to the request / response model. As soon as the response is closed you
would expect an END event.


It's fine to have expectations, but that's not going to happen. It is
fine to compare with a Servlet, but the only thing that cannot be
compared (and somehow is the thing you apparently want to compare) is
evidently the lifecycle, which is completely different.

Rémy

-
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: comet events and connections

2007-04-25 Thread Filip Hanik - Dev Lists

Daniel Doubleday wrote:

I don't think that a event.close() call should throw a NPE when the event
  

is
  

already closed. But I would rather catch an exception when I am writing
to
response object that has been closed.
  
  
that is possible to do, do you have the stack trace of the NPE?



Here is the stack trace:

Exception in thread "Thread-17" java.lang.NullPointerException
at
org.apache.catalina.connector.CometEventImpl.close(CometEventImpl.java:84)
at
com.mrtattle.tcniotest.CometServlet$Transport.close(CometServlet.java:42)
at com.mrtattle.tcniotest.CometServlet$1.run(CometServlet.java:117)
at java.lang.Thread.run(Thread.java:613)
  
yes, calling "close" on the begin event, and then expecting the 
CometEvent object to still function is a misuse of the API


  

Maybe I am getting something wrong, but I think that the api should
rather
reflect a request model, where the end event is triggered when the
response
is closed. Now it seems that it more reflects the connection model. I am
sure that one can live with it as it is though.
  
  
not sure I understand this and what you are trying to get at.



I think that the comet api represents a socket connection. The event life
cycle is bound to the connection life cycle. You get an END (or ERROR etc)
when the connection gets closed. But when you are writing something that
still looks like a servlet you would expect that the event life cycle is
bound to the request / response model. As soon as the response is closed you
would expect an END event.  
  

That's pretty much how it is
Filip


Filip Hanik - Dev Lists wrote:
  

Daniel Doubleday wrote:


Hi this post is a follow up from
http://issues.apache.org/bugzilla/show_bug.cgi?id=42198 where this post
does
not belong.

  

...
not sure I understand this and what you are trying to get at.
Filip






  



-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Filip Hanik - Dev Lists

Sebastiaan van Erk wrote:

Hi,

The fixes seem to work well, thanks again! :-)

Excellent, thanks for bringing it to my attention
Filip


Regards,
Sebastiaan

Sebastiaan van Erk wrote:

Hi,

Thanks for the quick action. I'll test the new version right away. :-)

Regards,
Sebastiaan

Filip Hanik - Dev Lists wrote:

Sebastian,
I have checked in a fix to SVN. You can also work around the problem 
by not using the shared selector by adding

-Dorg.apache.tomcat.util.net.NioSelectorShared=false
to your command line

Filip

Filip Hanik - Dev Lists wrote:

definitely a bug, I will work on a fix right away.
Filip

Sebastiaan van Erk wrote:

Hi,

I have the following problem with Comet. I have a long request, 
and I asynchronously write data to the output stream of the 
response while the request is between the BEGIN and END/ERROR 
events. However, the writes do NOT occur while IN a READ request, 
but are triggered by other events on the server side.


When I send a lot of data, the send buffer fills up, and the 
channel needs to be registered with the poller for the OP_WRITE 
event. However, this does not happen. In NioBlockingSelector line 
69, there is the following code that is supposed to register the 
channel for OP_WRITE:


   if ( att.getLatch()==null || 
att.getLatch().getCount()==0) att.startLatch(1);
   if ( att.interestOps() == 0) 
socket.getPoller().add(socket,SelectionKey.OP_WRITE);
   
att.getLatch().await(writeTimeout,TimeUnit.MILLISECONDS);


However, since I'm not in a comet READ event, att.interestOps() == 
1 (and not 0), therefore the event is never registered. 60 seconds 
later I get a SocketTimeoutException.


I figure this is probably a bug, but I thought I'd ask here just 
to be sure.


Regards,
Sebastiaan



-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Rémy Maucherat

On 4/26/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

Sebastiaan van Erk wrote:
> Hi,
>
> The fixes seem to work well, thanks again! :-)
Excellent, thanks for bringing it to my attention


And it was committed before tagging, not 5 minutes after as usually
happens. I feel lucky today.

Rémy

-
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: Comet problem when writing a lot of data to the OutputStream

2007-04-25 Thread Filip Hanik - Dev Lists

Rémy Maucherat wrote:

On 4/26/07, Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote:

Sebastiaan van Erk wrote:
> Hi,
>
> The fixes seem to work well, thanks again! :-)
Excellent, thanks for bringing it to my attention


And it was committed before tagging, not 5 minutes after as usually
happens. I feel lucky today.

he he, I broke my own pattern :)
Filip


Rémy

-
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 deployment question

2007-04-25 Thread Lakshmi Venkataraman
 
I have upgraded from Tomcat 3.3 to Tomcat 5.5.23.  It is running on
WinXP and I am using Java 1.5.
 
I asked this question before with a different directory set up in which
the "myApp" directory
was under Tomcat heirarchy. As Rashmi Rubdi suggested, by renaming
myApp.xml to ROOT.xml, I could
access my application using http://localhost:8080

Chuck Caldarale said it is preferable to have myApp outside Tomcat's
directory heirarchy. I am playing with a different directory structure
as shown below. Here Tomcat heirarchy is outside the myApp heirarchy.

Here's my dierctory set up:


   --Tomcat55   {catalina.home} 
--bin
-- conf
   -- Catalina
 --localhost
myApp.xml
--common
--server
--webapps
 
   -- myApp
   context.xml
   index.html
   --bin
   --html
   --jsp
   --css
   --jar
   --WEB-INF
web.xml
 --classes
 --lib
  
   


myApp.xml has the following:


 
 context.xml under myApp has


http://localhost:8080 brings up the default Tomcat homepage.
I am NOT able to access my application as http://localhost:8080/myApp
Ideally, I would like to access my application as http://localhost:8080.
So what am I missing in my definitions in myApp.xml or
myApp/context.xml?

Thanks a lot
Lakshmi



-
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 deployment question

2007-04-25 Thread Rashmi Rubdi

Hi Lakshmi,

I'll explain the way I got it to work - I think it's correct because I
can access my app at
the root context http://localhost:8080/

Please find my replies below:

Of course you can undo all the changes mentioned below and bring it
back to the original state at anytime.

On 4/25/07, Lakshmi Venkataraman <[EMAIL PROTECTED]> wrote:


Here's my dierctory set up:


   --Tomcat55   {catalina.home}
--bin
-- conf
   -- Catalina
 --localhost
myApp.xm


In the above change myApp.xml to ROOT.xml


--common
--server
--webapps

   -- myApp
   context.xml
   index.html
   --bin
   --html
   --jsp
   --css
   --jar
   --WEB-INF
web.xml
 --classes
 --lib




myApp.xml has the following:





Now myApp.xml is renamed to ROOT.xml , keep the path attribute empty
as in path=""
the docBase attibute looks correct.

It is also fine to keep your project outside Tomcat's webapps folder,
it makes it easier to upgrade Tomcat in the future.



 context.xml under myApp has



Also change path to path="" in context.xml



http://localhost:8080 brings up the default Tomcat homepage.


After making the above configuration changes in ROOT.xml and
context.xml the app
should be accessible at http://localhost:8080/


I am NOT able to access my application as http://localhost:8080/myApp
Ideally, I would like to access my application as http://localhost:8080.
So what am I missing in my definitions in myApp.xml or
myApp/context.xml?

Thanks a lot
Lakshmi



The concept is that ROOT.xml represents the root context which
corresponds to the first slash / after http://localhost:8080

If the context is called myApp.xml then naturally it is not the root
context so it appears under the myApp context.

Hope this clears things up.

Regards
-Rashmi

-
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 deployment question

2007-04-25 Thread Lakshmi Venkataraman
Hi Rashmi,
Thanks!  Worked! :)
By renaming myApp.xml to ROOT.xml and changing path="" in both ROOT.xml
and myApp/context.xml,
I can access my application as http://localhost:8080.  

But I am curious, why http://localhost:8080/myApp did NOT work? 

Thanks
Lakshmi

-Original Message-
From: Rashmi Rubdi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 8:25 PM
To: Tomcat Users List
Subject: Re: Tomcat deployment question

Hi Lakshmi,

I'll explain the way I got it to work - I think it's correct because I
can access my app at the root context http://localhost:8080/

Please find my replies below:

Of course you can undo all the changes mentioned below and bring it back
to the original state at anytime.

On 4/25/07, Lakshmi Venkataraman <[EMAIL PROTECTED]> wrote:
>
> Here's my dierctory set up:
>
> 
>--Tomcat55   {catalina.home}
> --bin
> -- conf
>-- Catalina
>  --localhost
> myApp.xm

In the above change myApp.xml to ROOT.xml

> --common
> --server
> --webapps
>
>-- myApp
>context.xml
>index.html
>--bin
>--html
>--jsp
>--css
>--jar
>--WEB-INF
> web.xml
>  --classes
>  --lib
>
>
>
>
> myApp.xml has the following:
>  privileged="true">
> 
>

Now myApp.xml is renamed to ROOT.xml , keep the path attribute empty as
in path=""
the docBase attibute looks correct.

It is also fine to keep your project outside Tomcat's webapps folder, it
makes it easier to upgrade Tomcat in the future.


>  context.xml under myApp has
> 

Also change path to path="" in context.xml

>
> http://localhost:8080 brings up the default Tomcat homepage.

After making the above configuration changes in ROOT.xml and context.xml
the app should be accessible at http://localhost:8080/

> I am NOT able to access my application as http://localhost:8080/myApp 
> Ideally, I would like to access my application as
http://localhost:8080.
> So what am I missing in my definitions in myApp.xml or 
> myApp/context.xml?
>
> Thanks a lot
> Lakshmi
>

The concept is that ROOT.xml represents the root context which
corresponds to the first slash / after http://localhost:8080

If the context is called myApp.xml then naturally it is not the root
context so it appears under the myApp context.

Hope this clears things up.

Regards
-Rashmi

-
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 deployment question

2007-04-25 Thread Caldarale, Charles R
> From: Lakshmi Venkataraman [mailto:[EMAIL PROTECTED] 
> Subject: RE: Tomcat deployment question
> 
> Chuck Caldarale said it is preferable to have myApp outside Tomcat's
> directory heirarchy.

That's only true when your desired app name is not the same as the name
of the .war file.

> 
>--Tomcat55   {catalina.home} 
> -- conf
>-- Catalina
>  --localhost
> myApp.xml

The above declares that the URI path to your app is http:///myApp,
not the default.

>-- myApp
>context.xml

No context.xml file should be at that location.  Even if it were at an
appropriate place (under the META-INF directory), it would be ignored,
since you already have the defining one in conf/Catalina/localhost.

> myApp.xml has the following:
>  privileged="true">
> 

The path attribute is not allowed and may well be preventing the app
from being deployed.  Also, the use of a back slash in the docBase may
cause difficulty, as some scanners interpret it as an escape character.
A forward slash should always work, even on Windows.

> context.xml under myApp has
> 

A pointless exercise, since the context.xml file in that location will
never be seen, and the path attribute is not allowed.

> http://localhost:8080 brings up the default Tomcat homepage.

As expected and previously explained by several responders: the default
app must be named ROOT; no ifs, ands, or buts.

> I am NOT able to access my application as http://localhost:8080/myApp

Most likely due to the incorrect attributes on the  element.

> Ideally, I would like to access my application as 
> http://localhost:8080.

Then you must name it ROOT, as everyone has been telling you.  Remove
the existing webapps/ROOT to avoid conflict.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Seamless transition between application updates

2007-04-25 Thread lightbulb432

What are the strategies you might use to update an application running on
multiple Tomcat instances (clustered with Apache mod_jk) with a seamless
transition for somebody who's using the application at the time the
application is redeployed? I've always wondered how web applications that
cannot afford downtime do it.

In my naive understanding I'd simply shut off all servers, redeploy the
updated applications, then turn all the servers back on. In this case, it's
pretty straightforward to understand what would happen. However, users would
experience downtime (or at least a non-seamless transition). In environments
that have requirements not to make users relogin everytime a change is made,
how would applications that provide smaller, more frequent updates survive?

How would you go about doing this, specifically, in a clustered Tomcat
environment? What things should I keep in mind when figuring out how to best
do this?

Problems that I foresee include someone who's POSTing from his current page
to a just-updated version of a servlet on Tomcat...in this case, what the
user expects to happen might not be what is expected, due to the servlet
update. In the best case the user has to relogin due to an error. In the
worst case the operation goes through successfully but modifies the data in
some unexpected way.

Your insight on this matter is greatly appreciated.
-- 
View this message in context: 
http://www.nabble.com/Seamless-transition-between-application-updates-tf3649567.html#a10194118
Sent from the Tomcat - User mailing list archive 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]