Re: AGAIN: How can you deploy an application onto a specific host?

2004-07-08 Thread Florian Ebeling
Hi Ivan,
you have to configure the manager app for each single host. So there is 
no ambiguity. host1.com/manager/ gets you the first, host2.com/manager/ 
the second, and so on. The host HTTP header is required in HTTP/1.1 
requests. In any other case you hit the default host.

Best
-Florian
Ivan Jouikov wrote:
Ive asked this question before but nobody seemed to know the answer. 
 So, Ill ask again

 

So, Tomcat has a maanger application, which allows you to dynamically 
deploy sutff. Nice.

But how can you deploy your stuff onto a SPECIFIC host?
Thx.
 

 


Best Regards,
Ivan V. Jouikov
(206) 228-6670
http://www.ablogic.net/
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 05.07.2004
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ROOT problems

2004-05-31 Thread Florian Ebeling
Hi,
remeber that the ROOT webapp is precompiled. So if you
alter index.jsp nothing will happen, which might confuse you.
-Florian
Ilan Azbel wrote:
Hello,
I am having trouble locating the ROOT of my tomcat server.
I have a line in the server.xml file that reads:
 Context path= docBase=ROOT debug=0/
I place a file index.html in /usr/tdk-2.2/webapps/ROOT/
When I browse to my server it doesn't seem to locate this file.
any ideas?
Ilan

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.691 / Virus Database: 452 - Release Date: 2004/05/26
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Newbie Help

2004-02-25 Thread Florian Ebeling
Hi Jason,

there is a fine tutorial covering this stuff. It contains a build.xml 
file which is similar to the deployer script. I think the latter evolved 
from the former. It contains also recommendations for directory layouts, 
etc. You find it here:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev/index.html

(It is now the First webapp chapter of the user guide.)

Best,
-Florian
Jason Tesser wrote:
I am really confused. I am trying to learn what the best way to build 
and 

Deploy my stuff to Tomcat 5.0 I have ant 1.6 downloaded and I 
downloaded The deployer for Tomcat 5. I have a few questions. 

1. How do I actually get these things to work for me? I have set up 

my environment variable (I am in Windows right now) for TOMCAT_HOME 
ANT_HOME and JAVA_HOME etc

2. How do I create and work with war files?

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


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


Re: jk2: [error] mod_jk child init 1 0 with win98

2004-02-24 Thread Florian Ebeling
Hi,

has anyone any further insight on this special topic? My error.log is 
also polluted by this error message. There was no response to the 
original question quoted, which is from 6. Dec. 2003.

Hans-Peter Fier wrote:
During Apache-startup an error [error] mod_jk child init 1 0 occurs.
Does anybody know about this problem an how to avoid it?
Maybe it's not an error but an erroneous handling of ChildID 0  in 
mod_jk2.c?


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


Re: dbcp doesn't stacktrace

2003-12-14 Thread Florian Ebeling
Hi Marten,

Marten Lehmann wrote:
 to test dbcp's stacktrace functionality, I didn't close the databases
 connection after use. But although I set the abondedTimeout to 60, the
 connections are never returned, they are still open and I don't see a
 stacktrace, too.
You only get stack traces when you ultimaltly run out of connections, if 
I remember well. Perhaps you should set max connextions attribute to a 
low, test-only value to verify the correct behaviour.

Regards,

-Florian



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


jikes/Win32 with encoding

2003-12-04 Thread Florian Ebeling
Hi,

I built jikes for win32 with -encoding compiled in and I wonder if 
anyone cares to use it, for example for JSP compilation, as suggested in 
the Definitive Guide.

Without thsi option, it was impossible to use jikes in conjuction with ant.

http://www.javaroom.de/index.html

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


Re: Can Tomcat run on JRE only?

2003-11-20 Thread Florian Ebeling
Hi Thierry,

you can compile JSPs into Java source code using the jspc. But this is 
rather meant for debugging and interpreting stack trace line numbers and 
the like. You could generate source and compile. But you still would 
have to invoke them. I don't know how one could convince the JSP-Servlet 
to forward requests to your precompiled JSP classes.

But anyway, were is the point in removing the compiler? Precompiling can 
be achieved using the

someJsp.jsp?jsp_precompile=true

facility, which is easily scriptable.

-Florian

Thierry Thelliez wrote:
My understanding is that the full JDK is needed for compiling JSPs. What if
the JSPs are already compiled? Can on deploy a JSP site without the full
JDK, only the JRE? Can I deploy the site without the JSP files themselves?
With a copy of the work directory?


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


Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Florian Ebeling
Hi,

I have read the whole documentation and the web.xml DTD, but I am still
somewhat confused concerning this question. I try to figure out the
exact relation between JNDI resources declared within the server.xml and
the web.xml.
Is it completely up to the developers/deployers wether the necessary
resources get declared in the server or in the application? Is it just
for convenience, so that deployer doesn't have to unpack the WAR? Or --
like someone stated on this list (to my confusion) -- that the
server.xml Resource element and the web.xml resource-ref have a relation
that is similar to that of an implementation class instance and an
interface?
Or are some things possible with server.xml/Resource (plus
ResourceParams) that are not possible with only modifying the DD? Can
anyone clarify this?
TIA,
-Florian
--
Florian Ebeling, Dipl.-Ing.
[EMAIL PROTECTED]
Tel. +49 172 926 76 26


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


Relationship between server.xml/Resource and web.xml/resource-ref.

2003-11-19 Thread Florian Ebeling
Hi,

I have read the whole documentation and the web.xml DTD, but I am still 
somewhat confused concerning this question. I try to figure out the 
exact relation between JNDI resources declared within the server.xml and 
the web.xml.

Is it completely up to the developers/deployers wether the necessary 
resources get declared in the server or in the application? Is it just 
for convenience, so that deployer doesn't have to unpack the WAR? Or -- 
like someone stated on this list (to my confusion) -- that the 
server.xml Resource element and the web.xml resource-ref have a relation 
that is similar to that of an implementation class instance and an 
interface?

Or are some things possible with server.xml/Resource (plus 
ResourceParams) that are not possible with only modifying the DD? Can 
anyone clarify this?

TIA,
-Florian
--
Florian Ebeling, Dipl.-Ing.
[EMAIL PROTECTED]
Tel. +49 172 926 76 26
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problems with dbcp

2003-11-03 Thread Florian Ebeling
Hi,

you probably do nor close some statement, resultSet or connection. When 
using CP one has to do this always explicitly.

Tyrex is an alternative CP implementation which has been replaced by DBCP.

Edson Alves Pereira wrote:

Hello folks, i followed what is written in tomcat-4.1.x´s JDNI
DataSource documentation, but i getting this error:
java.sql.SQLException: DBCP could not obtain an idle db connection, pool
exhausted
The machanism is not returning my connection to pool, what do i
should do? Do i really need tirex as Persistence Layer?  Here is my DBCP
configuration:
Resource name=jdbc/OracleDS
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/OracleDS
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter  
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value30/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter  
parameter
nameusername/name
valueblah/value
/parameter
parameter
namepassword/name
valueblah/value
/parameter  

parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter  
parameter
nameurl/name
valuejdbc:oracle:thin:@000.000.000:blah/value
/parameter
parameter
namevalidationQuery/name
valueselect sysdate from dual/value
/parameter  
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter  
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams
As i wrote above, DBCP should revover all connection objects and
close automatic everything, but is not. Any idea?
Regards,
Edson


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


Re: problems with dbcp

2003-11-03 Thread Florian Ebeling
Ok. That's the same point I am currently trying to solve. I 
intentionally leave connections open, but they don't get freed. Perhaps 
someone else could comment here?

-Florian

my settings in server.xml---

Resource name=jdbc/TomcatDS
   auth=Container
   type=javax.sql.DataSource/
  ResourceParams name=jdbc/TomcatDS
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
!-- Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --
parameter
  namemaxActive/name
  value20/value
/parameter
!-- Maximum number of idle dB connections to retain in pool.
 Set to 0 for no limit.
 --
parameter
  namemaxIdle/name
  value5/value
/parameter
!-- Maximum time to wait for a dB connection to become 
available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --
parameter
  namemaxWait/name
  value1/value
/parameter

parameter
 nameusername/name
 valuecaspar/value
/parameter
parameter
 namepassword/name
 valuegeheim/value
/parameter
parameter
   namedriverClassName/name
   valuecom.mysql.jdbc.Driver/value
/parameter
!-- The JDBC connection url for connecting to your MySQL dB.
 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if 
mysqld closed the
 connection.  mysqld by default closes idle connections 
after 8 hours.
 --
parameter
  nameurl/name

valuejdbc:mysql://localhost:3306/tomcatds?autoReconnect=true/value
/parameter
!-- Umgang mit nicht geschlossenen Statements, Connections und
 ResultSets.
--
parameter
  nameremoveAbandoned/name
  valuetrue/value
/parameter
parameter
  nameremoveAbandonedTimeout/name
  value10/value
/parameter
parameter
  namelogAbandoned/name
  valuetrue/value
/parameter
/ResourceParams

Edson Alves Pereira wrote:

But removeAbandoned and removeAbandonedTimeout doesn´t close
all ResultSet, Statement and Connections even if they are forsaken?


--
De: Florian Ebeling[SMTP:[EMAIL PROTECTED]
Responder:  Tomcat Users List
Enviada:segunda-feira, 3 de novembro de 2003 9:51
Para:   Tomcat Users List
Assunto:Re: problems with dbcp
Hi,

you probably do nor close some statement, resultSet or connection. When 
using CP one has to do this always explicitly.

Tyrex is an alternative CP implementation which has been replaced by DBCP.

Edson Alves Pereira wrote:


Hello folks, i followed what is written in tomcat-4.1.x´s JDNI
DataSource documentation, but i getting this error:
java.sql.SQLException: DBCP could not obtain an idle db connection, pool
exhausted
The machanism is not returning my connection to pool, what do i
should do? Do i really need tirex as Persistence Layer?  Here is my DBCP
configuration:
Resource name=jdbc/OracleDS
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/OracleDS
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter  
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value30/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter  
parameter
nameusername/name
valueblah/value
/parameter
parameter
namepassword/name
valueblah/value
/parameter  

parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter  
parameter
nameurl/name
valuejdbc:oracle:thin:@000.000.000:blah/value
/parameter
parameter
namevalidationQuery/name
valueselect sysdate from dual/value
/parameter  
parameter
nameremoveAbandoned/name
valuetrue/value
/parameter  
parameter
nameremoveAbandonedTimeout/name
value60/value
/parameter
parameter
namelogAbandoned/name
valuetrue/value
/parameter
/ResourceParams
As i wrote above, DBCP should revover all connection objects and
close automatic everything, but is not. Any idea

Re: Deploying TOMCAT on live production server

2003-11-03 Thread Florian Ebeling
Hi,

Apache is faster for static content and has shorter startup times. And 
HTTP implemenation is probably more mature in a pure HTTP server like 
apache.

Steve Jenkins wrote:

Hi,

Wonder if anyone can help. I keep reading that one should not deploy TOMCAT on its' own on a live production server, that you should use Apache as the main webserver redirecting through to TOMCAT - but I don't find anywhere that says why.

Why shouldn't you put just TOMCAT on a live production server? Why should you use Apache 
 Tomcat?
Anyone help?
Many thanks,
Steve.



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


Re: problems with dbcp

2003-11-03 Thread Florian Ebeling
one cannot count on the finalizer to do this job. DB connections eat up 
resources (memory, client licenses), and you never know when they get 
reclaimed by the finalizer (if at all). So setting a timeout for each 
connection is definitly a good idea, I guess.

-Florian

Peter Guyatt wrote:

Hi,

Why dont you override the finialize method so that when your objects fall
out of scope and are garbage collected then you close the connections ?
Thanks

Pete

-Original Message-
From: Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent: 03 November 2003 13:27
To: Tomcat Users List
Subject: Re: problems with dbcp
Ok. That's the same point I am currently trying to solve. I
intentionally leave connections open, but they don't get freed. Perhaps
someone else could comment here?
-Florian

my settings in server.xml---

Resource name=jdbc/TomcatDS
auth=Container
type=javax.sql.DataSource/
   ResourceParams name=jdbc/TomcatDS
 parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 !-- Maximum number of dB connections in pool. Make sure you
  configure your mysqld max_connections large enough to handle
  all of your db connections. Set to 0 for no limit.
  --
 parameter
   namemaxActive/name
   value20/value
 /parameter
 !-- Maximum number of idle dB connections to retain in pool.
  Set to 0 for no limit.
  --
 parameter
   namemaxIdle/name
   value5/value
 /parameter
 !-- Maximum time to wait for a dB connection to become
available
  in ms, in this example 10 seconds. An Exception is thrown if
  this timeout is exceeded.  Set to -1 to wait indefinitely.
  --
 parameter
   namemaxWait/name
   value1/value
 /parameter
 parameter
  nameusername/name
  valuecaspar/value
 /parameter
 parameter
  namepassword/name
  valuegeheim/value
 /parameter
 parameter
namedriverClassName/name
valuecom.mysql.jdbc.Driver/value
 /parameter
 !-- The JDBC connection url for connecting to your MySQL dB.
  The autoReconnect=true argument to the url makes sure that the
  mm.mysql JDBC Driver will automatically reconnect if
mysqld closed the
  connection.  mysqld by default closes idle connections
after 8 hours.
  --
 parameter
   nameurl/name
valuejdbc:mysql://localhost:3306/tomcatds?autoReconnect=true/value
 /parameter
 !-- Umgang mit nicht geschlossenen Statements, Connections und
  ResultSets.
 --
 parameter
   nameremoveAbandoned/name
   valuetrue/value
 /parameter
 parameter
   nameremoveAbandonedTimeout/name
   value10/value
 /parameter
 parameter
   namelogAbandoned/name
   valuetrue/value
 /parameter
 /ResourceParams

Edson Alves Pereira wrote:


But removeAbandoned and removeAbandonedTimeout doesn´t close
all ResultSet, Statement and Connections even if they are forsaken?



--
De: Florian Ebeling[SMTP:[EMAIL PROTECTED]
Responder:  Tomcat Users List
Enviada:segunda-feira, 3 de novembro de 2003 9:51
Para:   Tomcat Users List
Assunto:Re: problems with dbcp
Hi,

you probably do nor close some statement, resultSet or connection. When
using CP one has to do this always explicitly.
Tyrex is an alternative CP implementation which has been replaced by DBCP.

Edson Alves Pereira wrote:



Hello folks, i followed what is written in tomcat-4.1.x´s JDNI
DataSource documentation, but i getting this error:
java.sql.SQLException: DBCP could not obtain an idle db connection, pool
exhausted
The machanism is not returning my connection to pool, what do i
should do? Do i really need tirex as Persistence Layer?  Here is my DBCP
configuration:
Resource name=jdbc/OracleDS
auth=Container
type=javax.sql.DataSource/
ResourceParams name=jdbc/OracleDS
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
namemaxActive/name
value10/value
/parameter
parameter
namemaxIdle/name
value30/value
/parameter
parameter
namemaxWait/name
value1/value
/parameter
parameter
nameusername/name
valueblah/value
/parameter
parameter
namepassword/name
valueblah/value
/parameter
parameter
namedriverClassName/name
valueoracle.jdbc.driver.OracleDriver/value
/parameter
parameter
nameurl/name

Re: problems with dbcp

2003-11-03 Thread Florian Ebeling
Hi,

Edson Alves Pereira wrote:
Hello folks, i followed what is written in tomcat-4.1.x´s JDNI
DataSource documentation, but i getting this error:
java.sql.SQLException: DBCP could not obtain an idle db connection, pool
exhausted
Edson, which Tomcat versions do you use? I was puzzled why the example 
would not work and moved from my 4.1.24 to the most recent one, 4.1.29. 
Now it works without any further changes. I for one found it helpful to 
use my old configuration and custom app files by specifying 
CATALINA_BASE as to point to the old tomcat installation dir.

-Florian

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


Re: problems with dbcp

2003-11-03 Thread Florian Ebeling
 	I have here tomcat-4.1.24.

Then you should certainly try an upgrade. 29 uses DBCP 1.1, which was 
released like 2 weeks ago or something. But only dbcp.jar does not 
suffiece, commons-collection (or -pool, cant remember)  has changed 
also. I took the whole new tomcat.

-Florian

Edson Alves Pereira wrote:



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


Re: Which version of xerces, Tomcat 4.1.24 is using?

2003-11-01 Thread Florian Ebeling
soapboxI would like to see the java community begin naming their jars 
with the version, the same way the linux community labels their 
tarballs. Thank you/soapbox
That's what I thought so manny times! The ecplise guys do it already.

-Florian

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


Re: jk or jk2

2003-10-31 Thread Florian Ebeling
Dean-

thanks for sharing your material on your tested setup here. I wonder if 
you've got a distinct idea of how the syntax workers2.properties works. 
This is actually my single most pressing problem.

There is this section like thing: [foo:bar] What does it mean? Is it a

[type:instance]  -   eg. [uri:/context/*]

scheme, perhaps? This might make sense. Then this

[type:]  -   eg. [config:]

could be a class or singleton-like thing. And then, the properties. Do 
they always refer to the preceding square-bracketed item?

[type:obj]
property1=value1
property2=value2
What is the group syntax like? Is a group something I define with the 
[lb:some_lb_name] statement? Do I need a shared memory file under all 
circumstances, or is it neccessary only when I have several tomcats?

-Florian

Dean Searle wrote:

The Oreilly book is only for Tomcat and Tomcat as a Standalone web/application server. I have spent six months trying to figure out how everything works together and how to get things implemented. Both from FreeBSD and Windows. I do have documentation on how to get Apache2, Tomcat 4.1 and mod_jk2 to work together. Please keep in mind that this is old documentation that I have out there, some things are not optimized yet. 

I have just reconfigured my Apache2, Tomcat 4.1 and mod_jk2 installation. I currently have a test environment where I am running two instances of Apache2 from one binary install and three instances of Tomcat from one binary install. Each one running different configuration from straight static site to jsp site and jsp with SSL or Realm security with AD LDAP. But all using mod_jk2 when needed.

I will provide a link to my old documentation to get you started. I will try and answer any other questions also. I am not an expert here though, just some things I have figured out from reading numerous posts here and from other sites. I will repost an updated documentation as soon as all my testing is done.

http://www.computingoasis.com/apache download the PDF please.

-Dean

-Original Message-
From:   Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent:   Thu 10/30/2003 09:42
To: Tomcat Users List
Cc: 
Subject:Re: jk or jk2
Hi Bernhard,
  Here's a great book including mod_jk2:
  http://www.oreilly.de/catalog/tomcat/index.html
I got this book right next to my laptop, and I also like it quite much. 
But I can't find it useful when it comes to using mod_jk2. It don't 
really understand the contents of workers2.perperties. And they show 
only an example of this file in their book.

To give you an example:
[config:]
File=/usr/local/apache2/config/workers2.properties
debug=0
debugEnv=0
I guess here they define some config instance. Ok. But where is the 
point in giving the path to a config file *in exactly this config 
file*?! No idea.

Or, another example:
[uri:/examples]
info=Examples ...
context=/examples
worker=ajp13:localhost:8009
debug=0
This yields a deprecation warning in my apache2 error.log:
[Thu Oct 30 13:13:48 2003] [notice] uriEnv.setAttribute() the worker 
directive is deprecated. Use 'group' instead.

What is a group? I guess this could be a node group for load balancing 
purposes. But I don't know. And the books won't say, neither the ORA nor 
the Wrox one. I'm pretty stuck.

Sorry, I'm upset. Thanks for your hint, anyway.

-Florian



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








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


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


Re: jk or jk2

2003-10-30 Thread Florian Ebeling
Hi,

mod_jk2 is more or less undocumented. If you dont't want to dive into 
the C sources, be careful. mod_jk comes with quite solid descriptions.

-Florian

Bernhard Erdmann wrote:
Cory 'G' Watson wrote:
If starting a new _production_ setup, should I be using jk or jk2?  
I've seen conflicting information in my searches.
I recommend mod_jk2 for apache2. I discovered mod_jk does not forward 
properly requests by their JSESSIONID to the right servlet engine in a 
two tomcat loadbalanced setup.


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


Re: jk or jk2

2003-10-30 Thread Florian Ebeling
Hi Bernhard,

 Here's a great book including mod_jk2:
 http://www.oreilly.de/catalog/tomcat/index.html
I got this book right next to my laptop, and I also like it quite much. 
But I can't find it useful when it comes to using mod_jk2. It don't 
really understand the contents of workers2.perperties. And they show 
only an example of this file in their book.

To give you an example:
[config:]
File=/usr/local/apache2/config/workers2.properties
debug=0
debugEnv=0
I guess here they define some config instance. Ok. But where is the 
point in giving the path to a config file *in exactly this config 
file*?! No idea.

Or, another example:
[uri:/examples]
info=Examples ...
context=/examples
worker=ajp13:localhost:8009
debug=0
This yields a deprecation warning in my apache2 error.log:
[Thu Oct 30 13:13:48 2003] [notice] uriEnv.setAttribute() the worker 
directive is deprecated. Use 'group' instead.

What is a group? I guess this could be a node group for load balancing 
purposes. But I don't know. And the books won't say, neither the ORA nor 
the Wrox one. I'm pretty stuck.

Sorry, I'm upset. Thanks for your hint, anyway.

-Florian



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


mod_jk2 binary for Apache 2.0.47/Win

2003-10-28 Thread Florian Ebeling
Hi,

I am trying to integrate Tomcat with Apache2 via the mod_jk2 module and 
CoyoteConnector on the Java side. Nothing experimental here, so far.

Problem is
1) the module needs to be compiled against exactly the same Apache 
version into which it is to be deployed later
2) the only binary Apache2 is 2.0.47
3) the only binary mod_jk2 is against 2.0.43
4) I don't have a MSVC compiler suite
5) The jakarta-connector documents say that only MSVC is possible, so I 
conclude MinGW or Cygwin won't be helpful here

If anybody could point me to a solution to this it would be very helpful.

Thanks and regards,
-Florian


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


Re: mod_jk2 binary for Apache 2.0.47/Win

2003-10-28 Thread Florian Ebeling
Hi Jean-Max,

this won't work, Apache accepts only modules with exactly matching 
version numbers.

I tried the mod_jk module, because this one is in sync with the Apache2 
release. You can get it here: 
http://www.apache.de/dist/jakarta/tomcat-connectors/jk/binaries/win32/

mod_jk is deprecated, I know. But it has been in production for a faily 
long time, so it shouldn't be too daring to use this.

To get it running, one has to do configuration in several places:

First, I created a file workers.peroperties in $TOMCAT_HOME/conf like 
this:

---
worker.list=worker1
worker.worker1.host=127.0.0.1
worker.worker1.port=8009
worker.worker1.type=ajp13
---
Then I added this to $APACHE_HOME/conf/httpd.conf, behind the section 
where all the othher LoadModule ... directives get listed.
---
LoadModule jk_module modules/mod_jk_1.2.5_2.0.47.dll
#AddModule  mod_jk_1.2.5_2.0.47.c
#AddModule  jk_module.c
#AddModule mod_jk.c
JkWorkersFile c:/jakarta-tomcat-4.1.24/conf/workers.properties
JkLogFile C:/Programme/Apache Group/Apache2/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
---

- adjust path to your workers.properties here
- add path for a log file for the module here (eg. mod_jk.log)
Then, add this snippet to httpd.conf

VirtualHost *
ServerAdmin [EMAIL PROTECTED]
DocumentRoot C:/Programme/Apache Group/Apache2/htdocs_javaroom
ServerName javaroom
ErrorLog logs/javaroom-error.log
CustomLog logs/javaroom-access.log common
JkMount /*.jsp worker1
JkMount /javaroom/* worker1
/VirtualHost
- replace the virtual host server name with your server name
- replace JkMount /javaroom/* so that it specifies some webapp context 
of yours

And, finally, add the neccessary Tomcat Connector to your server.xml:

Connector className=org.apache.ajp.tomcat4.Ajp13Connector
  port=8009
  minProcessors=5
  maxProcessors=250
  /
- I put it just behind Service ... 

Then restart Tomcat and Apache2 and ping your app.

One question remains: All the documentation, I consulted said one has to 
use a AddModule ... directive in the httpd.conf. But all the commented 
variants above prevent the apache from starting up at all. Do you have 
any idea what this might happen to mean?

-Florian

Jean-Max Estay wrote:

Hello,

I think we are in the same lock.
I don't know if you saw my mail in this thread. In a nutshell, I try to
connect Apache 2.0.47 (win32) with Tomcat via JK2 and use the only module I
identify : mod_jk2-1.3.27.dll.
And Apache can't load this module from this dll !
If you resolve your pb, please send me the trick. I will do if I find it
first.


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


Re: mod_jk2 binary for Apache 2.0.47/Win

2003-10-28 Thread Florian Ebeling
Hi Asif,

thanks for your answere. I didn't try the module with the non-matching 
number. In fact, it does load. I read it several times, so I didn't 
question this. However, are you sure you do not have a jk2.properties 
file in your Tomcat /conf? The mod_jk2 documentation suggests there 
should be two file.

-Florian

Asif Chowdhary wrote:

Hi,

Apache 2.0.47 will work with mod_jk2 connector.
I have it working on my machine.
In apache httpd.conf

LoadModule jk2_module modules/mod_jk2.dll (I named it mod_jk2.dll)

workers2.properties file in your apache2/conf/ directory

#For the first tomcat listening on port 8009

First instance of Web Services listening on port 9000

[channel.socket:machine1:8009]
info=Ajp13 forwarding over socket
debug=20
tomcatId=tomcat1
#Load Balancing Tomcat on port 9000
lb_factor=20
#Second tomcat on machine 2 port 9300

#[channel.socket:machine2:8009]
#info=Ajp13 forwarding over socket
debug=20
#tomcatId=tomcat2
#Load Balancing tomcat port 9300
lb_factor=10
[status:]
info=Status worker,displays run time informations
[uri:/jkstatus/*]
info=Displaystatusinformationandcheckstheconfigfileforchanges.
group=status:
[uri:/examples/*]
info=Examplewebappinthedefaultcontext.
context=/examples
debug=20
#Configure the shared memory file
[shm]
file=C:/apache/apache2/logs/shm.file
size=1048576
debug=0
#End of Workers2.properties.

In server.xml

!-- 
 Define a Coyote/JK2 AJP 1.3 Connector on port 8009 
-- 

Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / 

Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=tomcat1

This is all you need to configure

Asif

-Original Message-
From: Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 7:32 AM
To: Tomcat Users List
Subject: mod_jk2 binary for Apache 2.0.47/Win
Hi,

I am trying to integrate Tomcat with Apache2 via the mod_jk2 module and 
CoyoteConnector on the Java side. Nothing experimental here, so far.

Problem is
1) the module needs to be compiled against exactly the same Apache 
version into which it is to be deployed later
2) the only binary Apache2 is 2.0.47
3) the only binary mod_jk2 is against 2.0.43
4) I don't have a MSVC compiler suite
5) The jakarta-connector documents say that only MSVC is possible, so I 
conclude MinGW or Cygwin won't be helpful here

If anybody could point me to a solution to this it would be very helpful.

Thanks and regards,
-Florian


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


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


Re: mod_jk2 binary for Apache 2.0.47/Win

2003-10-28 Thread Florian Ebeling
Hi Asif,

I get it up and running, finally. Many thanks for your help. I wonder: 
you don't know of a resource on configuring this strange animal, 
workers2.properties, by any chance? I found my current configuration by 
rather poking in the fog, tweaking your file here and there. This is not 
the most predictable of all methods, perhaps.

Regards,
-Florian
Asif Chowdhary wrote:

No I dont have that file in the conf directory. The documentation is very confusing.

It works fine

-Original Message-
From: Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 10:56 AM
To: Tomcat Users List
Subject: Re: mod_jk2 binary for Apache 2.0.47/Win
Hi Asif,

thanks for your answere. I didn't try the module with the non-matching 
number. In fact, it does load. I read it several times, so I didn't 
question this. However, are you sure you do not have a jk2.properties 
file in your Tomcat /conf? The mod_jk2 documentation suggests there 
should be two file.

-Florian

Asif Chowdhary wrote:


Hi,

Apache 2.0.47 will work with mod_jk2 connector.
I have it working on my machine.
In apache httpd.conf

LoadModule jk2_module modules/mod_jk2.dll (I named it mod_jk2.dll)

workers2.properties file in your apache2/conf/ directory

#For the first tomcat listening on port 8009

First instance of Web Services listening on port 9000

[channel.socket:machine1:8009]
info=Ajp13 forwarding over socket
debug=20
tomcatId=tomcat1
#Load Balancing Tomcat on port 9000
lb_factor=20
#Second tomcat on machine 2 port 9300

#[channel.socket:machine2:8009]
#info=Ajp13 forwarding over socket
debug=20
#tomcatId=tomcat2
#Load Balancing tomcat port 9300
lb_factor=10
[status:]
info=Status worker,displays run time informations
[uri:/jkstatus/*]
info=Displaystatusinformationandcheckstheconfigfileforchanges.
group=status:
[uri:/examples/*]
info=Examplewebappinthedefaultcontext.
context=/examples
debug=20
#Configure the shared memory file
[shm]
file=C:/apache/apache2/logs/shm.file
size=1048576
debug=0
#End of Workers2.properties.

In server.xml

!-- 
Define a Coyote/JK2 AJP 1.3 Connector on port 8009 
-- 

Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=75 enableLookups=true redirectPort=8443 acceptCount=10 debug=0 connectionTimeout=2 useURIValidationHack=false protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler / 

Engine name=Standalone defaultHost=localhost debug=0 jvmRoute=tomcat1

This is all you need to configure

Asif

-Original Message-
From: Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 7:32 AM
To: Tomcat Users List
Subject: mod_jk2 binary for Apache 2.0.47/Win
Hi,

I am trying to integrate Tomcat with Apache2 via the mod_jk2 module and 
CoyoteConnector on the Java side. Nothing experimental here, so far.

Problem is
1) the module needs to be compiled against exactly the same Apache 
version into which it is to be deployed later
2) the only binary Apache2 is 2.0.47
3) the only binary mod_jk2 is against 2.0.43
4) I don't have a MSVC compiler suite
5) The jakarta-connector documents say that only MSVC is possible, so I 
conclude MinGW or Cygwin won't be helpful here

If anybody could point me to a solution to this it would be very helpful.

Thanks and regards,
-Florian


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


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


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


Re: mod_jk2 binary for Apache 2.0.47/Win

2003-10-28 Thread Florian Ebeling
Jean-Max,

I was wrong assuming that one needs a mod_jk2 needs to bear the exactly 
same version number as the Apache2. I didn't even give it a try, because 
I read it at several places in the apache docs. I got mod_jk2 running 
now, with kind assistance of Asif Chowdhary, as you probably hab been 
able to read in the list.

I installed the mod_jk2-2.0.43.dll in apache/modules. Here is what I put 
into the diffrent config files:

httpd.conf: just one single row like this:
LoadModule jk2_module modules/mod_jk2-2.0.43.dll
Then I added a worker2.properties in Apache/conf/ like this:

[logger]
level=DEBUG
file=c:/programme/apache group/apache2/logs/jk2.log
[config]
file=c:/programme/apache group/apache2/conf/workers2.properties
debug=0
debugEnv=0
# Shared memory handling. Needs to be set.
[shm]
file=c:/programme/apache group/apache2/logs/shm.file
size=1048576
debug=0
#disabled=0
[channel.socket:localhost:8010]
port=8010
host=127.0.0.1
debug=0
# Example socket channel, explicitly set port and host.
# [channel.socket:localhost:8009]
# port=8009
# host=127.0.0.1
# Example UNIX domain socket
# [channel.un:/usr/local/tomcat/work/jk2.socket]
# tomcatId=localhost:8009
# debug=0
# define the worker
[ajp13:localhost:8010]
#channel=channel.un:/usr/local/pds/tomcat/work/jk2.socket
# To use the TCP/IP socket instead, just comment out the above
# line, and uncomment the one below
channel=channel.socket:localhost:8010
# define the worker
# Announce a status worker
# Uri mapping
[uri:/examples/*]
worker=ajp13:localhost:8010
[uri:/javaroom/*]
worker=ajp13:localhost:8010
[status:status]

[status:]
info=Status worker,displays run time informations
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
worker=status:status
[uri:/status/*]
worker=status:status
# end of workers2.properties

Finally, I configured this Connector in the Tomcat server.xml:
---
Connector className=org.apache.coyote.tomcat4.CoyoteConnector
   port=8010
   minProcessors=5 maxProcessors=250
   acceptCount=10 debug=0
   protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler /

I hope this helps you get it running.

Regards,
-Florian




Jean-Max Estay wrote:

Florian,

What a good news ! And where did you find this specif. ?

Many many  many thanks

And much more thanks


[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
http://www.ima.uco.fr/personnes/estay
Institut de Mathematiques Appliquees
Universite Catholique de l'Ouest
44,46 rue Rabelais
BP 808
49008 ANGERS Cedex 01
France
tel +33 2 41 81 67 05
fax +33 2 41 81 67 00



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


Tomcat 4.0.x

2003-10-17 Thread Florian Ebeling
Hi,

I'm trying to find an ancient 4.0 to do some experimenting. The download 
sites seem to have abandoned this release alltogether. Does anybody 
knows of a source for this thing?

Thanks,
-Florian


Justin Ruthenbeck wrote:

At 06:12 PM 10/16/2003, you wrote:

Running Tomcat 4.1.27, I'm currently deploying via the install task 
in the Ant script supplied with Tomcat, so all my files reside outside 
of the Tomcat directory.  Otherwise, everything's pretty normal 
(Tomcat resides in C:\tomcat).

Just for curiosity's sake, could I find out what methods there are 
(instead of only what someone thinks is best?).  6 months down the 
road my situation might change (this is still in development  real 
deployment might be different) and it'd be nice to know what my 
options are.  Suggestions for which method is best are of course still 
welcome.


You basically have two options:

(1) Write the file and directly reference it.  For example, if you write 
your file into $TOMCAT/webapps/appname/myfile.html, then you can point 
your browser directly to it and it can download.  If you always deploy 
your app exploded (not as a .war), then this is fine because you can use 
java's java.io.* classes to directly write to your filesystem.  This 
method limits your deployment options.  There's some way to construct 
the filesystem path to your webapp root through the javax.servlet.* 
classes, but I forgot what it is -- instead, pass the value in as an 
init parameter (jndi, servet init param, outside config file -- take 
your pick) to your servlet.  It would be something like:

// In your servlet
String webAppRoot = MyConfig.getWebAppRootPath();
File file = new File(webAppRoot+/myfile.html);
// Write whatever data you want to the File
(2) Write the file (anywhere), then make it available to users through a 
Servlet which serves the content.  Instead of writing a physical file to 
your webapp file tree, create a servlet that takes an argument 
specifying which file the user desires.  An example URL would look like:

http://server.com/myApp/NewFileServlet?path=reports.cash.mostRecent

This Servlet would take into account session info, the path parameter, 
security considerations, etc, to find the correct file and serve it back 
to the user.  This gives you the choice to store the file anywhere -- 
database, xml, remote server, anywhere -- and then serve it back up when 
requested.

You also avoid any deployment problems because you're not relying on the 
underlying filesystem to support your application's new files.

Hope that sheds some light on the topic ... (1) is quicker and easier, 
(2) is more robust and flexible, but is more involved to implement.  
Take your pick based on whatever other requirements you have.  If you 
have more questions, don't hesitate to ask.

justin


Thanks
Jason
Justin Ruthenbeck wrote:

Yes, it is possible.  Give us an idea of your deployment setup (are 
you deploying as a .war file?  Using default root paths?  Anything 
special?) and we can suggest the best way to go about doing it.

justin

At 04:16 PM 10/16/2003, you wrote:

Is it possible, in a servlet, to write to a temporary file in a 
location that I would then be able to link to so the users can 
download?  I couldn't find any information indicating either way.

Thanks
Jason


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



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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




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



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


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


Re: Tomcat 4.0.x

2003-10-17 Thread Florian Ebeling
Thanks, Steve. You're right.

-Florian

Steve Raeburn wrote:

http://archive.apache.org/dist/jakarta/tomcat-4/archive/

The location *is* documented on the main download page
(http://jakarta.apache.org/site/binindex.cgi). Scroll to the bottom and look
at the Apache Archives section.
Steve


-Original Message-
From: Florian Ebeling [mailto:[EMAIL PROTECTED]
Sent: October 17, 2003 12:32 PM
To: Tomcat Users List
Subject: Tomcat 4.0.x
Hi,

I'm trying to find an ancient 4.0 to do some experimenting. The download
sites seem to have abandoned this release alltogether. Does anybody
knows of a source for this thing?
Thanks,
-Florian


Justin Ruthenbeck wrote:


At 06:12 PM 10/16/2003, you wrote:


Running Tomcat 4.1.27, I'm currently deploying via the install task
in the Ant script supplied with Tomcat, so all my files reside outside
of the Tomcat directory.  Otherwise, everything's pretty normal
(Tomcat resides in C:\tomcat).
Just for curiosity's sake, could I find out what methods there are
(instead of only what someone thinks is best?).  6 months down the
road my situation might change (this is still in development  real
deployment might be different) and it'd be nice to know what my
options are.  Suggestions for which method is best are of course still
welcome.


You basically have two options:

(1) Write the file and directly reference it.  For example, if
you write

your file into $TOMCAT/webapps/appname/myfile.html, then you can point
your browser directly to it and it can download.  If you always deploy
your app exploded (not as a .war), then this is fine because
you can use

java's java.io.* classes to directly write to your filesystem.  This
method limits your deployment options.  There's some way to construct
the filesystem path to your webapp root through the javax.servlet.*
classes, but I forgot what it is -- instead, pass the value in as an
init parameter (jndi, servet init param, outside config file -- take
your pick) to your servlet.  It would be something like:
// In your servlet
String webAppRoot = MyConfig.getWebAppRootPath();
File file = new File(webAppRoot+/myfile.html);
// Write whatever data you want to the File
(2) Write the file (anywhere), then make it available to users
through a

Servlet which serves the content.  Instead of writing a
physical file to

your webapp file tree, create a servlet that takes an argument
specifying which file the user desires.  An example URL would look like:
http://server.com/myApp/NewFileServlet?path=reports.cash.mostRecent

This Servlet would take into account session info, the path parameter,
security considerations, etc, to find the correct file and
serve it back

to the user.  This gives you the choice to store the file anywhere --
database, xml, remote server, anywhere -- and then serve it
back up when

requested.

You also avoid any deployment problems because you're not
relying on the

underlying filesystem to support your application's new files.

Hope that sheds some light on the topic ... (1) is quicker and easier,
(2) is more robust and flexible, but is more involved to implement.
Take your pick based on whatever other requirements you have.  If you
have more questions, don't hesitate to ask.
justin



Thanks
Jason
Justin Ruthenbeck wrote:


Yes, it is possible.  Give us an idea of your deployment setup (are
you deploying as a .war file?  Using default root paths?  Anything
special?) and we can suggest the best way to go about doing it.
justin

At 04:16 PM 10/16/2003, you wrote:


Is it possible, in a servlet, to write to a temporary file in a
location that I would then be able to link to so the users can
download?  I couldn't find any information indicating either way.
Thanks
Jason


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



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
  See http://www.nextengine.com/confidentiality.php

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




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



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
  See http://www.nextengine.com/confidentiality.php

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


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

Restrict manager app to Contexts in one (virtual) Host

2003-10-16 Thread Florian Ebeling
Hi there,

I wonder if there is any means to give users access to the manager 
application, but let them only manipulate contexts located within their 
own virtual Hosts?

I think this question is one every ISP has to stumble across, provided 
he doesn't want to get please restart ... mails all day long and 
restart them manually.

I got a bit angry with my provider because he offers Java server, but 
he thaught JSP was everything there was to it. When I told him about 
Contexts he was not really prepared. Still he's willing to solve it. So 
I tried to figure it out by googling, browsing mail archives, etc. But, 
it has not yet become apparent to me how ISPs are supposed to set up 
tomcat4 to serve several virtual hosts. I told him to define one Host 
for me and he did so. It works, but this is not really sufficient for an 
ISP. It is unclear to me how to deploy and reload applications remotely, 
in a by-host manner.

Is there a tomcat-based solution out there, or is it necessary to work 
around it, somehow? (For example by invoking a small script local to the 
server via some custom admin page link, or something.)

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


Re: Restrict manager app to Contexts in one (virtual) Host

2003-10-16 Thread Florian Ebeling
Hi,

This is confusing. One second after posting I found in the javadoc for 
ManagerServlet this: [ManagerServlet is a] Servlet that enables remote 
management of the web applications installed within the same virtual 
host as this web application is

Tims answere suggests, that it is not possible without further steps taken.

I tried ManagerServlet initially with two Hosts using the *same* 
/webapps docBase. After reading the promising JavaDoc I seperated the 
contents of my single webapps dir, and it seems to do what I want: 
listing all within each of them when pointing to the different URLs.

I could imagine that many people get confused about this, because one is 
tempted to think the HTTP-provided Host: header shuold be enough to 
distinguish. But this behaviour also makes sense in a way. How should 
manager be able to distinguish a stopped app from one that does not 
belong to this Host? I can distinguish only by switching autoDeploy off 
and hard-wire the contexts in server.xml. But once I use manager, I want 
to override these settings and add contexts dynamically. So this seems OK.

I think now, this feature is already there. Here is how my server.xml 
looks like (excerpt):

  Host name=localhost debug=0 appBase=webapps_localhost
unpackWARs=true autoDeploy=false
Context className=org.apache.catalina.core.StandardContext
  path=/manager
  debug=0
  docBase=../server/webapps/manager
  privileged=true
  
/Context
Realm className=org.apache.catalina.realm.UserDatabaseRealm
  debug=0
  resourceName=UserDatabase
  validate=true/
ResourceLink global=UserDatabase name=users 
type=org.apache.catalina.UserDatabase/
  /Host
  Host name=javaroom debug=0 appBase=webapps_javaroom
autoDeploy=false
!--Logger className=org.apache.catalina.logger.FileLogger
  directory=logs prefix=javaroom timestamp=true/--
Context className=org.apache.catalina.core.StandardContext
  path=/manager
  debug=0
  docBase=../server/webapps/manager
  privileged=true

/Context
Realm className=org.apache.catalina.realm.UserDatabaseRealm
  debug=0
  resourceName=UserDatabase
  validate=true/
ResourceLink global=UserDatabase name=users 
type=org.apache.catalina.UserDatabase/
  /Host

For true multi-hosting there should also be one tomcat-users.xml per 
Host. This would result in more GlobalNamingResources entries (which in 
my server.xml gets referenced -- as in the default -- by UserDatbase).

Best regards,
-Florian
Tim Funk wrote:

This lately (past 6 months) has been becoming a more common request. But 
the functionality is not there as distributed by tomcat. Patches welcome.

Alternatives include:
- Adding a filter to the manager app for finer grained control
- Rewriting manager to allow its namespace to be authorized via 
web.xml's security constraints
- Creating another webapp which does all authorization then calls the 
manager app via a nested HttpRequest

-Tim

Florian Ebeling wrote:

Hi there,

I wonder if there is any means to give users access to the manager 
application, but let them only manipulate contexts located within 
their own virtual Hosts?

I think this question is one every ISP has to stumble across, provided 
he doesn't want to get please restart ... mails all day long and 
restart them manually.

I got a bit angry with my provider because he offers Java server, 
but he thaught JSP was everything there was to it. When I told him 
about Contexts he was not really prepared. Still he's willing to solve 
it. So I tried to figure it out by googling, browsing mail archives, 
etc. But, it has not yet become apparent to me how ISPs are supposed 
to set up tomcat4 to serve several virtual hosts. I told him to define 
one Host for me and he did so. It works, but this is not really 
sufficient for an ISP. It is unclear to me how to deploy and reload 
applications remotely, in a by-host manner.

Is there a tomcat-based solution out there, or is it necessary to work 
around it, somehow? (For example by invoking a small script local to 
the server via some custom admin page link, or something.)



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


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


Re: Restrict manager app to Contexts in one (virtual) Host

2003-10-16 Thread Florian Ebeling
Hi,

Tim Funk wrote:

Yes, you are OK if you restrict access to a single Host. My answer was 
geared towards finer grain control of restarting(or whatever) webapps 
within a single host. If all requirements are at the host level - I 
think your ok with what you have below.
Host level is perfect for me. Thanks, Tim.

-Florian



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