where to start!

2003-03-17 Thread himakara

Please let me know an article or page url to get an idea
about how to start with the jakarta-tomcat-4.1.18 source code
i just downloaded.
Warm Regards,
Himakara Pieris.





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



feature request

2003-03-17 Thread Riyaz Mansoor

hi

the tomcat variable catalina_base allows running multiple tomcat instances.
but currently this is limited. personally, i'm developing an application
that extends some server classes (to be placed in
catalina_home/server/classes), some classes to be placed in
catalina_home/common/classes and some in catalina_home/shared/classes.
currently i have to put my custom extensions on the catalina_home (as above)
directory structure.

so i'd like to request that the classloader load from the catalina_base
directory structure and (then) from the catalina_home directory structure.

this way my catalina_home home would be fresh for everyone, and i can keep
my custome extension classes as a group on the catalina_base directory -
much easier for managing.

ps: is there a feature request for tomcat somewhere?

thanx

riyaz


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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Compiler.java

2003-03-17 Thread remm
remm2003/03/17 01:16:32

  Modified:jasper2/src/share/org/apache/jasper/compiler Tag:
tomcat_4_branch Compiler.java
  Log:
  - Port patch from 5.x.
  - Avoid a NPE when JSPC is used with built-in compilation (which can be useful
when working with individual JSPs).
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.18.2.13 +6 -4  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.18.2.12
  retrieving revision 1.18.2.13
  diff -u -r1.18.2.12 -r1.18.2.13
  --- Compiler.java 17 Feb 2003 22:36:08 -  1.18.2.12
  +++ Compiler.java 17 Mar 2003 09:16:32 -  1.18.2.13
  @@ -161,7 +161,9 @@
   logger.setMessageOutputLevel( Project.MSG_INFO );
   }
   project.addBuildListener( logger );
  -project.setBasedir( System.getProperty(catalina.home));
  + if (System.getProperty(catalina.home) != null) {
  +project.setBasedir( System.getProperty(catalina.home));
  +}
   
   if( options.getCompiler() != null ) {
   Constants.jasperLog.log(Compiler  + options.getCompiler(), 
Logger.INFORMATION);
  
  
  

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



Re: JDBCRealm CLIENT-CERT Authentication

2003-03-17 Thread jazorin
Hi.

You need to add to the web.xml file the following lines:

  login-config
auth-methodCLIENT-CERT/auth-method
  /login-config

When you try to connect to the protected resource, the navigator will 
request a client certificate.

Regards.

--
Hi,

i tried the following:
+ Add the mehtod authenticate(...) to the File JDBCRealm.java
+ build a Tomcat distribution
+ replace the catalina.jar with the new version (on an other machine)
+ add role-namefull DN/role-name to the web.xml
+ insert into table users ('DN','DN')
+ insert into table user_roles ('DN','DN')

Then i try to connect with a browser to the protected ressource and the 
browser requests login and password.

Any suggestions?

thanks

Patrick



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



[4.1.23] Deprecating mod_webapp

2003-03-17 Thread Remy Maucherat
Hi,

I'd like to officially deprecate mod_webapp in Tomcat 4.1.23.

It is no longer maintained, and will not work with Tomcat 5.0 (at least 
it won't unless people contribute stuff).

Remy

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


cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs class-loader-howto.xml

2003-03-17 Thread remm
remm2003/03/17 01:39:55

  Modified:webapps/tomcat-docs class-loader-howto.xml
  Log:
  - Add additional CL docs.
  
  Revision  ChangesPath
  1.9   +15 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml
  
  Index: class-loader-howto.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/class-loader-howto.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- class-loader-howto.xml12 Jan 2003 17:26:46 -  1.8
  +++ class-loader-howto.xml17 Mar 2003 09:39:54 -  1.9
  @@ -215,6 +215,21 @@
   /section
   
   
  +section name=J2SE classes and extensions
  +
  +pIn addition to the previous rules, the web application classloader 
  +delegates classloading for classes which are part of J2SE (which means 
  +it will attempt loading first with its parent classloader before loading 
  +from its current repositories, regardless of the current delegation setting). 
  +This includes classes from the SAX and DOM APIs, Xalan, Xerces, 
  +and any classes which package name starts with javax../p
  +
  +pThe web application classloader will also refuse to load classes from the
  +core Java language (java.* packages)./p
  +
  +/section
  +
  +
   section name=XML Parsers and JDK 1.4
   
   pAmong many other changes, the JDK 1.4 release packages the JAXP APIs, and
  
  
  

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



cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/config connectors.xml jk2.xml

2003-03-17 Thread remm
remm2003/03/17 01:51:43

  Modified:webapps/tomcat-docs/config connectors.xml jk2.xml
  Log:
  - Update connector documentation.
  
  Revision  ChangesPath
  1.3   +11 -10jakarta-tomcat-4.0/webapps/tomcat-docs/config/connectors.xml
  
  Index: connectors.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/connectors.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- connectors.xml12 Jan 2003 17:26:48 -  1.2
  +++ connectors.xml17 Mar 2003 09:51:43 -  1.3
  @@ -77,33 +77,34 @@
   trthWeb Server Side/ththProtocol/ththTomcat Site/ththNotes/th/tr
   
   tr
  - tdmod_jserv/tdtdajp1.2/td
  + tdmod_jserv/tdtdAJP/1.2/td
tdAjp11/td
tdObsolete Read more at 
   a href=http://java.apache.org/jserv/index.html; JServ/a/td
   /tr
   
   tr
  - tdmod_jk/tdtdajp1.3/td
  - tdAjp13Connector/td
  - tdmod_jk supports load balancing. See a href=jk.htmlJK/a
  -Works with 3.x and 4.x.
  + tdmod_jk/tdtdAJP/1.3/td
  + tdCoyoteConnector with JkCoyoteHandler/td
  + tdmod_jk supports load balancing. Enabled by default in 4.1; 
  + works in 4.0. See a href=jk2.htmlCoyote JK 2/a
   /td
   /tr
   
   tr
  - tdmod_jk2/tdtdajp1.3/ajp1.4/td
  - tdCoyoteConnector+JkCoyoteHandler/td
  - tdCurrent developpements. Enabled by default in 4.1; works in 4.0.
  + tdmod_jk2/tdtdAJP/1.3/td
  + tdCoyoteConnector with JkCoyoteHandler/td
  + tdCurrently developed native connector. Enabled by default in 4.1.
mod_jk2 supports in-process JVM and load balancing.
   See a href=jk2.htmlCoyote JK 2/a
   /td
   /tr
   
   tr
  - tdmod_webapp/tdtdWARP 1.0/td
  + tdmod_webapp/tdtdWARP/1.0/td
tdWarpConnector/td
  - tdNot for Win32; no in-process nor load balancing; works in 4.x.
  + tdDeprecated. Not for Win32; no in-process nor load balancing; 
  +works in 4.x.
   Use a href=http://apr.apache.org/;APR/a.
   Supported Apache-2.0 and Apache-1.3).
   See a href=webapp.htmlWebapp/a
  
  
  
  1.6   +1 -2  jakarta-tomcat-4.0/webapps/tomcat-docs/config/jk2.xml
  
  Index: jk2.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/config/jk2.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- jk2.xml   12 Jan 2003 17:26:48 -  1.5
  +++ jk2.xml   17 Mar 2003 09:51:43 -  1.6
  @@ -92,8 +92,7 @@
 strongorg.apache.coyote.tomcat4.CoyoteConnector/strong, but you
 must specify the protocolHandlerClassName attribute (see below)./p
   
  -  pstrongThis implementation supports the AJP 1.3 and 1.4 
  -  protocols./strong/p
  +  pstrongThis implementation supports the AJP/1.3 protocol./strong/p
   
 pIt supports the following additional attributes (in addition to the
 common attributes listed above):/p
  
  
  

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



Re: /admin

2003-03-17 Thread Amy Roh
Costin Manolache wrote:
The admin app is now mostly broken - I did a small try to get it running,
but it'll take more work.
Amy - I would appreciate your help :-)
Okie.  I'll try to synch up the mbean names this week.  :-)

Amy

There are still several components that need to be changed - the biggest
problem at the moment is that some components are using the Engine name
and some are using the default from mbeans-descriptors.
Costin

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


cvs commit: jakarta-tomcat-4.0 RELEASE-NOTES-4.1.txt

2003-03-17 Thread remm
remm2003/03/17 02:21:33

  Modified:.RELEASE-NOTES-4.1.txt
  Log:
  - Update release notes.
  
  Revision  ChangesPath
  1.68  +22 -6 jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt
  
  Index: RELEASE-NOTES-4.1.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/RELEASE-NOTES-4.1.txt,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- RELEASE-NOTES-4.1.txt 16 Mar 2003 21:19:37 -  1.67
  +++ RELEASE-NOTES-4.1.txt 17 Mar 2003 10:21:32 -  1.68
  @@ -735,6 +735,7 @@
AuthenticatorBase
Redirect for trailing slash prior to auth challenge for root contexts 
   
  +
   
   Coyote Bug Fixes:
   
  @@ -1208,8 +1209,12 @@
   
   [4.1.22] #17775
JspRuntimeContext
  - Grant web applications JSP pages a FilePermission to read the web 
application
  - context directory in addition to its contents.
  + Grant web applications JSP pages a FilePermission to read 
  + the web application context directory in addition to its contents.
  +
  +[4.1.23] Compiler:
  + Avoid NPE when using JSPC using the built-in compiler.
  +
   
   
   KNOWN ISSUES IN THIS RELEASE:
  @@ -1255,10 +1260,10 @@
   A standard installation of Tomcat 4 makes all of the following APIs available
   for use by web applications (by placing them in common/lib or shared/lib):
   * activation.jar (Java Activation Framework)
  -* ant.jar (Apache Ant 1.5)
  -* commons-collections.jar (Commons Collections 2.0)
  +* ant.jar (Apache Ant 1.5.1)
  +* commons-collections.jar (Commons Collections 2.1)
   * commons-dbcp.jar (Commons DBCP 1.0)
  -* commons-logging-api.jar (Commons Logging 1.0.1)
  +* commons-logging-api.jar (Commons Logging 1.0.2)
   * commons-pool.jar (Commons Pool 1.0)
   * jasper-compiler.jar (Jasper 2 Compiler)
   * jasper-runtime.jar (Jasper 2 Runtime)
  @@ -1388,3 +1393,14 @@
   
   Using the invoker servlet in a production environment is not recommended and
   is unsupported.
  +
  +
  +-
  +Using the JSP Compiler (JSPC):
  +-
  +
  +Using the command line script is not recommended when using JSPC. Instead, 
  +using Ant is supported and encouraged. Please see the Jasper documentation
  +in the Tomcat documentation bundle for more instructions as well as 
  +a build script.
  +
  
  
  

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



Re: JDBCRealm CLIENT-CERT Authentication

2003-03-17 Thread Patrick Flohr
Hi,

i use already the client-cert method and a suitable security-role.
May i made a mistake during build?
How can be ensured that tomcat make use of the new authenticate method?
thanks

Patrick

jazorin wrote:
Hi.

You need to add to the web.xml file the following lines:

  login-config
auth-methodCLIENT-CERT/auth-method
  /login-config
When you try to connect to the protected resource, the navigator will 
request a client certificate.

Regards.

--
Hi,
i tried the following:
+ Add the mehtod authenticate(...) to the File JDBCRealm.java
+ build a Tomcat distribution
+ replace the catalina.jar with the new version (on an other machine)
+ add role-namefull DN/role-name to the web.xml
+ insert into table users ('DN','DN')
+ insert into table user_roles ('DN','DN')
Then i try to connect with a browser to the protected ressource and the 
browser requests login and password.

Any suggestions?

thanks

Patrick



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





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


DO NOT REPLY [Bug 10903] - Unbalanced tags do not generate compile time error

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10903.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Unbalanced tags do not generate compile time error





--- Additional Comments From [EMAIL PROTECTED]  2003-03-17 12:00 ---
This bug is also in 4.1 and is more generally that you can add superflouos
close-tags.

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



DO NOT REPLY [Bug 10903] - Unbalanced tags do not generate compile time error

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10903.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Unbalanced tags do not generate compile time error

[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|4.0.4 Final |4.1.18

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



DO NOT REPLY [Bug 18061] New: - symlink to jar in WEB-INF/lib does not work on application reload

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18061.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

symlink to jar in WEB-INF/lib does not work on application reload

   Summary: symlink to jar in WEB-INF/lib does not work on
application reload
   Product: Tomcat 4
   Version: 4.1.21
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Administration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


On reload (touch web.xml)

WebappLoader[/mm]: Deploy JAR /WEB-INF/lib/oscache.jar to
/home/mmbase/mmbase-app/WEB-INF/lib/oscache.jar
ContextConfig[/mm] Exception processing JAR at resource path /WEB-INF/lib/mmbase.jar
javax.servlet.ServletException: Exception processing JAR at resource path
/WEB-INF/lib/mmbase.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:930)
at org.apache.catalina.startup.ContextConfig.tldScan(ContextConfig.java:868)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:647)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:243)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3567)
at
org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfig.java:614)
at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854)
at java.lang.Thread.run(Thread.java:536)
- Root Cause -
java.lang.IllegalArgumentException: Invalid TLD resource path
/WEB-INF/lib/mmbase.jar
at
org.apache.catalina.startup.ContextConfig.tldScanJar(ContextConfig.java:898)
 

While it goes well on initial load

It also works if mmbase.jar is not a symlink.

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



Re: mod_jk 1.2.3 release

2003-03-17 Thread Henri Gomez
Glenn Nielsen wrote:


Henri Gomez wrote:

Glenn Nielsen wrote:

It has been a while since a mod_jk 1.2 release was done.
There have been a number of bug fixes and a few minor feature 
enhancements.

I just did some commits to fix some bugs I was seeing with mod_jk 1.2 
and
Apache 2.0.  Some of these will also improve the connector for other web
servers. (Better handling of aborted clients)

I just upgraded one of our production sites from Apache 1.3 mod_jk 
1.2.2 to
Apache 2.0 mod_jk 1.2.3-dev.  So far everything is looking good.

I really wanted to add support for using the APR to implement a global
tomcat socket connector pool.  There just doesn't seem to be any easy
way to do it without major code refactoring.  Argh!


JK2 is our target, with APR +/- mandatory.

Perhaps we could do a mod_jk 1.2.3 release in two weeks or so?

That should give adequate time for testing.


+0

Good idea but don't have time to do the RI.

Would you like doing it ?

What is required to do the release?  Do you have any notes on how to do
connector releases?
The usual part are :

- tag JTC

- make a source tarball, and keep only jk related stuff
  (see the contents of jk 1.2.2 tarball)
- make binaries (I'll do the linux, may be Nacho or Mladen could make
  the windows/IIS and Mike Anderson the netware.
- Make the announce.

The only platforms I could build binaries for is Solaris 7/8 x86/sparc.

Regards,

Glenn

--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming   |  * if iz ina coment.  |
Missouri Research and Education Network  |  */   |
--
-
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: [4.1.23] Deprecating mod_webapp

2003-03-17 Thread Glenn Nielsen
+1

Remy Maucherat wrote:
Hi,

I'd like to officially deprecate mod_webapp in Tomcat 4.1.23.

It is no longer maintained, and will not work with Tomcat 5.0 (at least 
it won't unless people contribute stuff).

Remy

-
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_jk 1.2.3 release

2003-03-17 Thread Glenn Nielsen
Thanks.  It isn't ready yet.  I tried over the weekend running Apache 
2/mod_jk-1.2.3-dev
on a production site.  With my recent commits it is running much better, but it is 
still
failing at least once a day. Argh!  I'll have to go back once again and see if I can
reproduce the failure on a test system.
Glenn

Henri Gomez wrote:
Glenn Nielsen wrote:



Henri Gomez wrote:

Glenn Nielsen wrote:

It has been a while since a mod_jk 1.2 release was done.
There have been a number of bug fixes and a few minor feature 
enhancements.

I just did some commits to fix some bugs I was seeing with mod_jk 
1.2 and
Apache 2.0.  Some of these will also improve the connector for other 
web
servers. (Better handling of aborted clients)

I just upgraded one of our production sites from Apache 1.3 mod_jk 
1.2.2 to
Apache 2.0 mod_jk 1.2.3-dev.  So far everything is looking good.

I really wanted to add support for using the APR to implement a global
tomcat socket connector pool.  There just doesn't seem to be any easy
way to do it without major code refactoring.  Argh!




JK2 is our target, with APR +/- mandatory.

Perhaps we could do a mod_jk 1.2.3 release in two weeks or so?

That should give adequate time for testing.




+0

Good idea but don't have time to do the RI.

Would you like doing it ?

What is required to do the release?  Do you have any notes on how to do
connector releases?


The usual part are :

- tag JTC

- make a source tarball, and keep only jk related stuff
  (see the contents of jk 1.2.2 tarball)
- make binaries (I'll do the linux, may be Nacho or Mladen could make
  the windows/IIS and Mike Anderson the netware.
- Make the announce.

The only platforms I could build binaries for is Solaris 7/8 x86/sparc.

Regards,

Glenn

--
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
MOREnet System Programming   |  * if iz ina coment.  |
Missouri Research and Education Network  |  */   |
--
-
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: [4.1.23] Tag soon

2003-03-17 Thread Henri Gomez
Glenn Nielsen wrote:
Remy Maucherat wrote:

Hi,

I plan to tag 4.1.23 soon. The big question remaining is if we remove, 
or not, the commons-fileupload related functionality.

Personally, I'm willing to ignore the issue.

I am ok with releasing 4.1.23 with commons-fileupload Beta 1 release.
We allready have commons-upload beta1 rpm in jpackage ;)



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


RE: [4.1.23] Deprecating mod_webapp

2003-03-17 Thread George Sexton
It's also horribly broken and not compliant with the servlet API.
Specifically, it doesn't forward all requests within the context to the
servlet engine, but attempts to let Apache fulfill static requests.

-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 2:34 AM
To: Tomcat Developers List
Subject: [4.1.23] Deprecating mod_webapp


Hi,

I'd like to officially deprecate mod_webapp in Tomcat 4.1.23.

It is no longer maintained, and will not work with Tomcat 5.0 (at least
it won't unless people contribute stuff).

Remy


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


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



DO NOT REPLY [Bug 18069] New: - Changing enablePooling should force page recompiling

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18069.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Changing enablePooling should force page recompiling

   Summary: Changing enablePooling should force page recompiling
   Product: Tomcat 4
   Version: 4.1.18
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Enhancement
  Priority: Other
 Component: Jasper 2
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I recently found out that the tag library I was working with was not
spec-compliant and was having problems because of tag pooling. So, in an effort
to get things working I disabled tag pooling to make sure that was the problem.
It was only later that I realized that since I hadn't re-deployed the JSP's, it
was probably still using the old work/*/.java files. Deleting everything in the
work directory fixed this and now the tags are frolicking again.

Since enablePooling is something that affects how the .java files are generated,
it seems to me that if Tomcat realizes that the enablePooling setting has
changed, that it should force a recompile of all the jsp's the next time they're
hit (or whenever). I don't know if this opens up a can of worms (for instance,
should it do the same thing if the classdebuginfo setting changes too). But
that's why I'm listing the severity as enhancement instead of bug.

Thanks!

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



build.xml still broken...

2003-03-17 Thread Jean-Francois Arcand
Hi,

the nightly scriptm who starts from a clean workspace, fail with the 
following:

downloadfile:
   [mkdir] Created dir: /home/jfarcand/jakarta-tomcat/tyrex-1.0
 [get] Getting: http://telia.dl.sourceforge.net/sourceforge/tyrex/tyrex-1.0.jar
init:
   [mkdir] Created dir: /disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build
   [mkdir] Created dir: 
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/classes
   [mkdir] Created dir: 
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/server/lib
   [mkdir] Created dir: 
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/common/lib
build-depends:

build-servletapi:
[echo] == Building: 
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar
prepare:

static:

compile:

examples:

javadoc:

jar:
[copy] Copying 1 file to 
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/build
 [jar] Building jar: 
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar
BUILD FAILED
file:/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/build.xml:140:
 Problem creating jar: 
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar (No such file or 
directory) (and the archive is probably corrupt but I could not delete it)
Anybody seeing this exception?

-- Jeanfrancois



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


Suggestion for DefaultServlet (easier spidering by search engines)

2003-03-17 Thread Chris Brown

Hello,

Just a little suggestion to help search engines spider Tomcat websites
easier...

Could somebody add the following to the directory listings generated by
tomcat ?

meta name=robots content=noindex,follow/

Thanks,
Chris



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



DO NOT REPLY [Bug 17572] - Tomcat manager Ant tasks should support failonerror attribute

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17572.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Tomcat manager Ant tasks should support failonerror attribute





--- Additional Comments From [EMAIL PROTECTED]  2003-03-17 16:34 ---
We have run into a similar problem and have found a workaround.  Our problem is
that we want to make sure that a webapp is undeployed before it is deployed.  If
the webapp does not exist and is undeployed then ant will exit with 1.  You can
call the undeploy or stop task by doing a runtime exec from ant to call the
task.  This would cause any exception thrown to be ignored.

exec executable=ant
  arg value=stop /
/exec

This would call the stop task from another process.If an exception is thrown it
will not stop the ant task.

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



DO NOT REPLY [Bug 18073] New: - gzip compression checks for wrong content type

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18073.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

gzip compression checks for wrong content type

   Summary: gzip compression checks for wrong content type
   Product: Tomcat 4
   Version: 4.1.22
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I'm using 4.1.23 and gzip is not working if I use compression=on, but only if 
compression=force.




I think it is in this piece of code:


http11/src/java/org/apache/coyote/http11/Http11Processor.java:1130




if ((contentLength == -1)


|| (contentLength  compressionMinSize)) 


// Check for compatible MIME-TYPE


if (compressableMimeTypes != null)


return (inStringArray(compressableMimeTypes,


response.getContentType()));


}




I don't have the possibility to compile and test everything, but I think 
response.getContentType() returns text/html;charset=iso-8859-1 and 
inStringArray compares this to text/html which returns false.




And maybe bug 2820 can be closed if this works.

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



RE: build.xml still broken...

2003-03-17 Thread Filip Hanik
yes I got it too,

I think all you need to do is to change the buildscript to actually create
the directory
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/
first, then it will work,

Filip

-Original Message-
From: Jean-Francois Arcand [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 7:50 AM
To: Tomcat Developers List
Subject: build.xml still broken...


Hi,

the nightly scriptm who starts from a clean workspace, fail with the
following:

downloadfile:
[mkdir] Created dir: /home/jfarcand/jakarta-tomcat/tyrex-1.0
  [get] Getting:
http://telia.dl.sourceforge.net/sourceforge/tyrex/tyrex-1.0.jar

init:
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/classes
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/server/lib
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/common/lib

build-depends:

build-servletapi:
 [echo] == Building:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar

prepare:

static:

compile:

examples:

javadoc:

jar:
 [copy] Copying 1 file to
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/build
  [jar] Building jar:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar

BUILD FAILED
file:/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/bu
ild.xml:140: Problem creating jar:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar (No such
file or directory) (and the archive is probably corrupt but I could not
delete it)

Anybody seeing this exception?

-- Jeanfrancois




-
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: build.xml still broken...

2003-03-17 Thread Tim Funk
I got it to build by undoing Costin's change when revision 1.111 was made:
http://cvs.apache.org/viewcvs.cgi/jakarta-tomcat-5/build.xml.diff?r1=1.110r2=1.111diff_format=h
Where
   property name=servlet-api.dist value=${servlet-api.home} /
is commented out, I uncommented it and the build worked fine.
-Tim

Filip Hanik wrote:
yes I got it too,

I think all you need to do is to change the buildscript to actually create
the directory
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/
first, then it will work,
Filip

-Original Message-
From: Jean-Francois Arcand [mailto:[EMAIL PROTECTED]
Sent: Monday, March 17, 2003 7:50 AM
To: Tomcat Developers List
Subject: build.xml still broken...
Hi,

the nightly scriptm who starts from a clean workspace, fail with the
following:
downloadfile:
[mkdir] Created dir: /home/jfarcand/jakarta-tomcat/tyrex-1.0
  [get] Getting:
http://telia.dl.sourceforge.net/sourceforge/tyrex/tyrex-1.0.jar
init:
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/classes
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/server/lib
[mkdir] Created dir:
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-tomcat-5/build/common/lib
build-depends:

build-servletapi:
 [echo] == Building:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar
prepare:

static:

compile:

examples:

javadoc:

jar:
 [copy] Copying 1 file to
/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/build
  [jar] Building jar:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar
BUILD FAILED
file:/disk/raid0/home/jfarcand/jakarta-tomcat/jakarta-servletapi-5/jsr154/bu
ild.xml:140: Problem creating jar:
/home/jfarcand/jakarta-tomcat/servlet-api-2.4/lib/servlet-api.jar (No such
file or directory) (and the archive is probably corrupt but I could not
delete it)
Anybody seeing this exception?

-- Jeanfrancois



 


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


Error page when the user cancel the authentication

2003-03-17 Thread jazorin
Hi.

I have a JNDIRealm with certificate authentication. When the user 
cancel the authentication he see a error page: Cancelled Action.

How can I include my own error page when the user cancel the 
certificate authentication??

Regards.



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



KNOW ERRORS

2003-03-17 Thread McDonald, Colin (EDU-Shared)
We have experienced a similar error to the one reported in Tomcat 3 (Bug #
235).

This was accompanied by some strange Coyote errors.

Would Coyote have report errors from this module 

Colin McDonald
Manager - Information Services
Education and Training
307 - 1181 Portage Avenue
Winnipeg, Manitoba
R3G 0T3

Work: 204 945-2535
Cell:   204 510-3109



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



DO NOT REPLY [Bug 16508] - Response is not being committed after RequestDispatcher forward

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16508.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Response is not being committed after RequestDispatcher forward

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Normal  |Critical



--- Additional Comments From [EMAIL PROTECTED]  2003-03-17 18:33 ---
Seems the Severity of this bug is mis-assigned.

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



DO NOT REPLY [Bug 18075] New: - Extra stop-restart after a manager deploy

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18075.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Extra stop-restart after a manager deploy

   Summary: Extra stop-restart after a manager deploy
   Product: Tomcat 4
   Version: 4.1.21
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Manager
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Here's the scenario:

I am deploying a simple webapp via the Tomcat 4.1.X manager.
After deploying the webapp once, I update the timestamp on
/WEB-INF/web.xml and redeploy (undeploy followed
by a deploy).  Both by monitoring the default
localhost_log.date.txt log and by using a thread profiling
tool (JProbe threadalyzer), I noticed that there seems to be
a redundant (and erroneous) webapp stop and restart.  I see a stop
and a restart that are caused by the actual deploy and then
within a few seconds, I see a second stop and restart.

In org.apache.catalina.startup.HostConfig, there is a thread
that periodically checks if the deployment descriptor
(/WEB-INF/web.xml) of a webapp has been modified and if it has,
the webapp is stopped and restarted (presumably via a catalina
LifecycleEvent).  If I'm reading the code correctly, there is
a HashMap in HostConfig that contains the last modified times
for the various web.xml files.  It seems that deploying through
the manager webapp does not update this Map (nor is this Map
particularly accessible without some refactoring).

Having a redundant stop and restart may not be bad (though it
would seem to be a bug).  However, I'm trying to track down
a resource leak where I am only able to redeploy 3 or 4 times
before I see an OutOfMemoryError and I am trying to rule out
this stop/restart behavior.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread costin
costin  2003/03/17 11:16:13

  Modified:catalina/src/share/org/apache/catalina ServerFactory.java
  Log:
  Default.
  
  I'm trying a different path that will reduce the breakage and make /admin
  work with embeded as well.
  Basically I'm creating the Service and Server, even for embeded ( where only
  engine is used ). That will make the model consistent - even if Server and Service
  are barely used.
  
  Revision  ChangesPath
  1.2   +8 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ServerFactory.java
  
  Index: ServerFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ServerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServerFactory.java18 Jul 2002 16:47:36 -  1.1
  +++ ServerFactory.java17 Mar 2003 19:16:13 -  1.2
  @@ -64,6 +64,8 @@
   
   package org.apache.catalina;
   
  +import org.apache.catalina.core.StandardServer;
  +
   
   /**
* pstrongServerFactory/strong allows the registration of the
  @@ -95,7 +97,8 @@
* Return the singleton codeServer/code instance for this JVM.
*/
   public static Server getServer() {
  -
  +if( server==null )
  +server=new StandardServer();
   return (server);
   
   }
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardEngine.java

2003-03-17 Thread costin
costin  2003/03/17 11:16:42

  Modified:catalina/src/share/org/apache/catalina/core
StandardEngine.java
  Log:
  Same.
  
  Revision  ChangesPath
  1.6   +38 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardEngine.java   17 Mar 2003 07:30:09 -  1.5
  +++ StandardEngine.java   17 Mar 2003 19:16:42 -  1.6
  @@ -357,7 +357,6 @@
   
   }
   
  -
   /**
* Disallow any attempt to set a parent for this Container, since an
* Engine is supposed to be at the top of the Container hierarchy.
  @@ -372,15 +371,12 @@
   }
   
   
  -/**
  - * Start this Engine component.
  - *
  - * @exception LifecycleException if a startup error occurs
  - */
  -public void start() throws LifecycleException {
  -if( started ) {
  -return;
  -}
  +private boolean initialized=false;
  +
  +public void init() {
  +if( initialized ) return;
  +initialized=true;
  +
   if( oname==null ) {
   // not registered in JMX yet - standalone mode
   try {
  @@ -392,6 +388,34 @@
   }
   }
   
  +if( service==null ) {
  +// for consistency...
  +try {
  +service=new StandardService();
  +service.initialize();
  +service.setContainer( this );
  +} catch( Throwable t ) {
  +t.printStackTrace();
  +}
  +}
  +
  +}
  +
  +public void destroy() {
  +if( ! initialized ) return;
  +initialized=false;
  +
  +}
  +
  +/**
  + * Start this Engine component.
  + *
  + * @exception LifecycleException if a startup error occurs
  + */
  +public void start() throws LifecycleException {
  +if( started ) {
  +return;
  +}
   // Log our server identification information
   //System.out.println(ServerInfo.getServerInfo());
   log.info( Starting Servlet Engine:  + ServerInfo.getServerInfo());
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardServer.java StandardService.java mbeans-descriptors.xml

2003-03-17 Thread costin
costin  2003/03/17 11:22:07

  Modified:catalina/src/share/org/apache/catalina/core
StandardServer.java StandardService.java
mbeans-descriptors.xml
  Log:
  Get the server, service self-register.
  
  Add serviceNames attribute in server - this should be used instead of casting and
  calling the methods directly.
  
  In order for /admin to be used for clusters it is essential to _stop_ using any
  internal tomcat class in the admin. Just do a grep o.a.catalina in admin -
  it shouldn't find any import. Only JMX should be used !
  
  The names should be stable.
  
  Revision  ChangesPath
  1.13  +78 -10
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java
  
  Index: StandardServer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- StandardServer.java   3 Feb 2003 23:05:48 -   1.12
  +++ StandardServer.java   17 Mar 2003 19:22:07 -  1.13
  @@ -87,8 +87,18 @@
   import java.util.Random;
   
   import javax.naming.directory.DirContext;
  +import javax.management.InstanceNotFoundException;
  +import javax.management.MBeanException;
  +import javax.management.RuntimeOperationsException;
  +import javax.management.ObjectName;
  +import javax.management.MBeanServer;
  +import javax.management.MalformedObjectNameException;
  +import javax.management.MBeanRegistration;
   
   import org.apache.commons.beanutils.PropertyUtils;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
  +import org.apache.commons.modeler.Registry;
   
   import org.apache.catalina.Connector;
   import org.apache.catalina.Container;
  @@ -137,8 +147,10 @@
*/
   
   public final class StandardServer
  -implements Lifecycle, Server {
  -
  +implements Lifecycle, Server, MBeanRegistration 
  + {
  +private static Log log = LogFactory.getLog(StandardServer.class);
  +   
   
   // -- Constants
   
  @@ -619,6 +631,16 @@
   return (services);
   
   }
  +
  +/** @jmx:attribute List services
  +*/
  +public ObjectName[] getServiceNames() {
  +ObjectName onames[]=new ObjectName[ services.length ];
  +for( int i=0; iservices.length; i++ ) {
  +onames[i]=((StandardService)services[i]).getObjectName();
  +}
  +return onames;
  +}
   
   
   /**
  @@ -2331,21 +2353,67 @@
   
   }
   
  +public void init() throws Exception {
  +initialize();
  +}
  +
   /**
* Invoke a pre-startup initialization. This is used to allow connectors
* to bind to restricted ports under Unix operating environments.
*/
   public void initialize()
  -throws LifecycleException {
  -if (initialized)
  -throw new LifecycleException (
  -sm.getString(standardServer.initialize.initialized));
  +throws LifecycleException 
  +{
  +if (initialized) {
  +log.info(sm.getString(standardServer.initialize.initialized));
  +return;
  +}
   initialized = true;
   
  +if( oname==null ) {
  +try {
  +oname=new ObjectName( Catalina:type=Server);
  +Registry.getRegistry().registerComponent(this, oname, null );
  +} catch (Exception e) {
  +log.error(Error registering ,e);
  +}
  +}
  +
   // Initialize our defined Services
   for (int i = 0; i  services.length; i++) {
   services[i].initialize();
   }
   }
  +
  +protected String type;
  +protected String domain;
  +protected String suffix;
  +protected ObjectName oname;
  +protected MBeanServer mserver;
   
  +public ObjectName getObjectName() {
  +return oname;
  +}
  +
  +public String getDomain() {
  +return domain;
  +}
  +
  +public ObjectName preRegister(MBeanServer server,
  +  ObjectName name) throws Exception {
  +oname=name;
  +mserver=server;
  +domain=name.getDomain();
  +return name;
  +}
  +
  +public void postRegister(Boolean registrationDone) {
  +}
  +
  +public void preDeregister() throws Exception {
  +}
  +
  +public void postDeregister() {
  +}
  +
   }
  
  
  
  1.3   +87 -16
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardService.java
  
  Index: StandardService.java
  ===
  RCS file: 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappLoader.java

2003-03-17 Thread costin
costin  2003/03/17 11:22:37

  Modified:catalina/src/share/org/apache/catalina/loader
WebappLoader.java
  Log:
  Fix the registration
  
  Revision  ChangesPath
  1.11  +4 -2  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java
  
  Index: WebappLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebappLoader.java 17 Mar 2003 07:37:32 -  1.10
  +++ WebappLoader.java 17 Mar 2003 19:22:37 -  1.11
  @@ -103,6 +103,7 @@
   import org.apache.catalina.LifecycleListener;
   import org.apache.catalina.Loader;
   import org.apache.catalina.Logger;
  +import org.apache.catalina.Engine;
   import org.apache.catalina.core.ContainerBase;
   import org.apache.catalina.core.StandardContext;
   import org.apache.catalina.util.LifecycleSupport;
  @@ -682,7 +683,8 @@
   // Register ourself. The container must be a webapp
   try {
   StandardContext ctx=(StandardContext)container;
  -oname=new ObjectName(ctx.getDomain() + :type=Loader,path= +
  +Engine eng=(Engine)ctx.getParent().getParent();
  +oname=new ObjectName(eng.getName() + :type=Loader,path= +
   ctx.getPath() + ,host= + ctx.getParent().getName());
   Registry.getRegistry().registerComponent(this, oname, null);
   controller=oname;
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java

2003-03-17 Thread costin
costin  2003/03/17 11:22:55

  Modified:catalina/src/share/org/apache/catalina/mbeans
ServerLifecycleListener.java
  Log:
  More stuff going out.
  
  Revision  ChangesPath
  1.9   +30 -30
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java
  
  Index: ServerLifecycleListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ServerLifecycleListener.java  17 Mar 2003 07:40:49 -  1.8
  +++ ServerLifecycleListener.java  17 Mar 2003 19:22:54 -  1.9
  @@ -428,8 +428,8 @@
   protected void createMBeans(Context context) throws Exception {
   
   // Create the MBean for the Context itself
  -if (log.isDebugEnabled())
  -log.debug(Creating MBean for Context  + context);
  +//if (log.isDebugEnabled())
  +//log.debug(Creating MBean for Context  + context);
   //MBeanUtils.createMBean(context);
   context.addContainerListener(this);
   if (context instanceof StandardContext) {
  @@ -466,14 +466,14 @@
   if (cManager != null) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Manager  + cManager);
  -MBeanUtils.createMBean(cManager);
  +//MBeanUtils.createMBean(cManager);
   }
   Realm hRealm = context.getParent().getRealm();
   Realm cRealm = context.getRealm();
   if ((cRealm != null)  (cRealm != hRealm)) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Realm  + cRealm);
  -MBeanUtils.createMBean(cRealm);
  +//MBeanUtils.createMBean(cRealm);
   }
   
   // Create the MBeans for the NamingResources (if any)
  @@ -568,7 +568,7 @@
   if (dManager != null) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Manager  + dManager);
  -MBeanUtils.createMBean(dManager);
  +//MBeanUtils.createMBean(dManager);
   }
   
   // Create the MBeans for the NamingResources (if any)
  @@ -608,7 +608,7 @@
   if (eRealm != null) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Realm  + eRealm);
  -MBeanUtils.createMBean(eRealm);
  +//MBeanUtils.createMBean(eRealm);
   }
   
   // Create the MBeans for each child Host
  @@ -659,7 +659,7 @@
   if ((hRealm != null)  (hRealm != eRealm)) {
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Realm  + hRealm);
  -MBeanUtils.createMBean(hRealm);
  +//MBeanUtils.createMBean(hRealm);
   }
   
   // Create the MBeans for each child Context
  @@ -743,7 +743,7 @@
   // Create the MBean for the Server itself
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Server  + server);
  -MBeanUtils.createMBean(server);
  +//MBeanUtils.createMBean(server);
   if (server instanceof StandardServer) {
   ((StandardServer) server).addPropertyChangeListener(this);
   }
  @@ -783,7 +783,7 @@
   // Create the MBean for the Service itself
   if (log.isDebugEnabled())
   log.debug(Creating MBean for Service  + service);
  -MBeanUtils.createMBean(service);
  +//MBeanUtils.createMBean(service);
   if (service instanceof StandardService) {
   ((StandardService) service).addPropertyChangeListener(this);
   }
  @@ -843,13 +843,13 @@
   if ((cRealm != null)  (cRealm != hRealm)) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Realm  + cRealm);
  -MBeanUtils.destroyMBean(cRealm);
  +//MBeanUtils.destroyMBean(cRealm);
   }
   Manager cManager = context.getManager();
   if (cManager != null) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Manager  + cManager);
  -MBeanUtils.destroyMBean(cManager);
  +//MBeanUtils.destroyMBean(cManager);
   }
   Logger hLogger = context.getParent().getLogger();
   Logger cLogger = context.getLogger();
  @@ -954,7 +954,7 @@
   if (dManager != null) {
   if (log.isDebugEnabled())
   log.debug(Destroying MBean for Manager  + dManager);
  -MBeanUtils.destroyMBean(dManager);
  +//MBeanUtils.destroyMBean(dManager);
   }
   
   Loader dLoader = dcontext.getLoader();
  @@ -1003,7 +1003,7 @@
   if (eRealm != null) {
  

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm RealmBase.java

2003-03-17 Thread costin
costin  2003/03/17 11:24:13

  Modified:catalina/src/share/org/apache/catalina/realm RealmBase.java
  Log:
  Registration.
  
  I also commented out main() - if it is really used, it should be in a separate
  class - in startup for example.
  
  The main() in Embeded should also be removed ( it seems like test code )
  
  Revision  ChangesPath
  1.7   +87 -46
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java
  
  Index: RealmBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm/RealmBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RealmBase.java12 Mar 2003 06:52:14 -  1.6
  +++ RealmBase.java17 Mar 2003 19:24:13 -  1.7
  @@ -81,6 +81,10 @@
   import javax.management.ObjectName;
   import javax.management.MBeanServer;
   import javax.management.MBeanRegistration;
  +import javax.management.InstanceNotFoundException;
  +import javax.management.MBeanException;
  +import javax.management.ReflectionException;
  +import javax.management.MalformedObjectNameException;
   
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
  @@ -91,6 +95,9 @@
   import org.apache.catalina.LifecycleListener;
   import org.apache.catalina.Logger;
   import org.apache.catalina.Realm;
  +import org.apache.catalina.core.StandardEngine;
  +import org.apache.catalina.core.StandardHost;
  +import org.apache.catalina.core.StandardContext;
   
   import org.apache.catalina.deploy.LoginConfig;
   import org.apache.catalina.deploy.SecurityConstraint;
  @@ -101,6 +108,7 @@
   import org.apache.catalina.util.MD5Encoder;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.commons.modeler.Registry;
   
   /**
* Simple implementation of bRealm/b that reads an XML file to configure
  @@ -762,6 +770,9 @@
   log.info(sm.getString(realmBase.alreadyStarted));
   return;
   }
  +if( !initialized ) {
  +init();
  +}
   lifecycle.fireLifecycleEvent(START_EVENT, null);
   started = true;
   
  @@ -959,24 +970,24 @@
   }
   
   
  -/**
  - * Digest password using the algorithm especificied and
  - * convert the result to a corresponding hex string.
  - * If exception, the plain credentials string is returned
  - */
  -public static void main(String args[]) {
  -
  -if(args.length  2  args[0].equalsIgnoreCase(-a)) {
  -for(int i=2; i  args.length ; i++){
  -System.out.print(args[i]+:);
  -System.out.println(Digest(args[i], args[1]));
  -}
  -} else {
  -System.out.println
  -(Usage: RealmBase -a algorithm credentials);
  -}
  -
  -}
  +///**
  +// * Digest password using the algorithm especificied and
  +// * convert the result to a corresponding hex string.
  +// * If exception, the plain credentials string is returned
  +// */
  +//public static void main(String args[]) {
  +//
  +//if(args.length  2  args[0].equalsIgnoreCase(-a)) {
  +//for(int i=2; i  args.length ; i++){
  +//System.out.print(args[i]+:);
  +//System.out.println(Digest(args[i], args[1]));
  +//}
  +//} else {
  +//System.out.println
  +//(Usage: RealmBase -a algorithm credentials);
  +//}
  +//
  +//}
   
   //  JMX and Registration  
   protected String type;
  @@ -1020,32 +1031,62 @@
   public void postDeregister() {
   }
   
  -public void init() throws Exception {
  -if( container!= null ) {
  -return;
  -}
  -
  -// Register with the parent
  -Set names=null;
  -if( host == null ) {
  -// global
  -names=mserver.queryNames(new ObjectName(domain +:type=Engine,*), 
null);
  -} else if( path==null ) {
  -names=mserver.queryNames(new ObjectName(domain +
  -:type=Host,host= + host +,*), null);
  -} else {
  -names=mserver.queryNames(new ObjectName(domain 
+:j2eeType=WebModule,name=// +
  -host + / + path + ,*), null);
  +protected boolean initialized=false;
  +
  +public void init() {
  +if( initialized ) return;
  +
  +initialized=true;
  +if( container== null ) {
  +// Register with the parent
  +try {
  +Set names=null;
  +if( host == null ) {
  +// global
  +names=mserver.queryNames(new ObjectName(domain 
+:type=Engine,*), null);
  +} else if( 

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java

2003-03-17 Thread costin
costin  2003/03/17 11:24:35

  Modified:catalina/src/share/org/apache/catalina/session
ManagerBase.java
  Log:
  Registration
  
  Revision  ChangesPath
  1.14  +33 -2 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java
  
  Index: ManagerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ManagerBase.java  21 Jan 2003 00:43:18 -  1.13
  +++ ManagerBase.java  17 Mar 2003 19:24:35 -  1.14
  @@ -87,9 +87,12 @@
   import org.apache.catalina.Engine;
   import org.apache.catalina.Manager;
   import org.apache.catalina.Session;
  +import org.apache.catalina.core.StandardContext;
  +import org.apache.catalina.core.StandardHost;
   import org.apache.catalina.util.StringManager;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  +import org.apache.commons.modeler.Registry;
   
   
   /**
  @@ -223,6 +226,8 @@
   // number of duplicated session ids - anything 0 means we have problems
   protected int duplicates=0;
   
  +protected boolean initialized=false;
  +
   /**
* The string manager for this package.
*/
  @@ -603,7 +608,33 @@
   
   
   // - Public Methods
  -
  +public void destroy() {
  +if( oname != null )
  +Registry.getRegistry().unregisterComponent(oname);
  +initialized=false;
  +}
  +
  +public void init() {
  +if( initialized ) return;
  +initialized=true;
  +
  +if( oname==null ) {
  +try {
  +StandardContext ctx=(StandardContext)this.getContainer();
  +Engine eng=(Engine)ctx.getParent().getParent();
  +domain=eng.getName();
  +StandardHost hst=(StandardHost)ctx.getParent();
  +
  +oname=new ObjectName(domain + :type=Manager,path=
  ++ ctx.getPath() + ,host= + hst.getName());
  +Registry.getRegistry().registerComponent(this, oname, null );
  +} catch (Exception e) {
  +log.error(Error registering ,e);
  +}
  +}
  +log.info(Registering  + oname );
  +   
  +}
   
   /**
* Add this Session to the set of active Sessions for this Manager.
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session PersistentManagerBase.java

2003-03-17 Thread costin
costin  2003/03/17 11:25:11

  Modified:catalina/src/share/org/apache/catalina/session
PersistentManagerBase.java
  Log:
  Registration ( call super ).
  
  commons-logging
  
  Revision  ChangesPath
  1.7   +60 -59
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java
  
  Index: PersistentManagerBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/PersistentManagerBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PersistentManagerBase.java12 Dec 2002 15:11:53 -  1.6
  +++ PersistentManagerBase.java17 Mar 2003 19:25:11 -  1.7
  @@ -66,27 +66,20 @@
   
   import java.beans.PropertyChangeEvent;
   import java.beans.PropertyChangeListener;
  -import java.beans.PropertyChangeSupport;
   import java.io.IOException;
   import java.security.AccessController;
  -import java.security.PrivilegedAction;
  -import java.security.PrivilegedExceptionAction;
   import java.security.PrivilegedActionException;
  -import java.util.ArrayList;
  -import java.util.Iterator;
  -import javax.servlet.ServletContext;
  +import java.security.PrivilegedExceptionAction;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
  -import org.apache.catalina.Globals;
   import org.apache.catalina.Lifecycle;
  -import org.apache.catalina.LifecycleEvent;
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.LifecycleListener;
  -import org.apache.catalina.Loader;
  -import org.apache.catalina.Manager;
   import org.apache.catalina.Session;
   import org.apache.catalina.Store;
   import org.apache.catalina.util.LifecycleSupport;
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   
   
   /**
  @@ -105,7 +98,9 @@
   
   public abstract class PersistentManagerBase
   extends ManagerBase
  -implements Lifecycle, PropertyChangeListener, Runnable {
  +implements Lifecycle, PropertyChangeListener, Runnable
  + {
  +private static Log log = LogFactory.getLog(PersistentManagerBase.class);
   
   //  Security Classes
private class PrivilegedStoreClear
  @@ -452,7 +447,7 @@
   if ( super.findSession(id) != null )
   return true;
   } catch (IOException e) {
  -log(checking isLoaded for id,  + id + , +e.getMessage(), e);
  +log.error(checking isLoaded for id,  + id + , +e.getMessage(), e);
   }
   return false;
   }
  @@ -592,14 +587,14 @@
   AccessController.doPrivileged(new PrivilegedStoreClear());
   }catch(PrivilegedActionException ex){
   Exception exception = ex.getException();
  -log(Exception clearing the Store:  + exception);
  +log.error(Exception clearing the Store:  + exception);
   exception.printStackTrace();
   }
   } else {
   store.clear();
   }
   } catch (IOException e) {
  -log(Exception clearing the Store:  + e);
  +log.error(Exception clearing the Store:  + e);
   e.printStackTrace();
   }
   
  @@ -702,14 +697,14 @@
   ids = (String[])AccessController.doPrivileged(new 
PrivilegedStoreKeys());
   }catch(PrivilegedActionException ex){
   Exception exception = ex.getException();
  -log(Exception clearing the Store:  + exception);
  +log.error(Exception clearing the Store:  + exception);
   exception.printStackTrace();
   }
   } else {
   ids = store.keys();
   }
   } catch (IOException e) {
  -log(Can't load sessions from store,  + e.getMessage(), e);
  +log.error(Can't load sessions from store,  + e.getMessage(), e);
   return;
   }
   
  @@ -717,14 +712,14 @@
   if (n == 0)
   return;
   
  -if (debug = 1)
  -log(sm.getString(persistentManager.loading, String.valueOf(n)));
  +if (log.isDebugEnabled())
  +log.debug(sm.getString(persistentManager.loading, String.valueOf(n)));
   
   for (int i = 0; i  n; i++)
   try {
   swapIn(ids[i]);
   } catch (IOException e) {
  -log(Failed load session from store,  + e.getMessage(), e);
  +log.error(Failed load session from store,  + e.getMessage(), e);
   }
   
   }
  @@ -759,14 +754,14 @@
   

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardManager.java

2003-03-17 Thread costin
costin  2003/03/17 11:25:37

  Modified:catalina/src/share/org/apache/catalina/session
StandardManager.java
  Log:
  Registration.
  
  Less verbosity.
  
  Revision  ChangesPath
  1.7   +26 -16
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java
  
  Index: StandardManager.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardManager.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StandardManager.java  9 Jan 2003 19:09:33 -   1.6
  +++ StandardManager.java  17 Mar 2003 19:25:37 -  1.7
  @@ -85,6 +85,9 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import javax.servlet.ServletContext;
  +import javax.management.MBeanRegistration;
  +import javax.management.ObjectName;
  +import javax.management.MBeanServer;
   import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.Globals;
  @@ -95,8 +98,11 @@
   import org.apache.catalina.Loader;
   import org.apache.catalina.Manager;
   import org.apache.catalina.Session;
  +import org.apache.catalina.core.StandardContext;
  +import org.apache.catalina.core.StandardHost;
   import org.apache.catalina.util.CustomObjectInputStream;
   import org.apache.catalina.util.LifecycleSupport;
  +import org.apache.commons.modeler.Registry;
   
   
   /**
  @@ -116,7 +122,8 @@
   
   public class StandardManager
   extends ManagerBase
  -implements Lifecycle, PropertyChangeListener, Runnable {
  +implements Lifecycle, PropertyChangeListener, Runnable 
  + {
   
   //  Security Classes
   private class PrivilegedDoLoad
  @@ -194,7 +201,6 @@
*/
   private boolean started = false;
   
  -
   /**
* The background thread.
*/
  @@ -469,8 +475,7 @@
   classLoader = loader.getClassLoader();
   if (classLoader != null) {
   if (log.isDebugEnabled())
  -log.debug(Creating custom object input stream for class loader 

  -+ classLoader);
  +log.debug(Creating custom object input stream for class loader 
);
   ois = new CustomObjectInputStream(bis, classLoader);
   } else {
   if (log.isDebugEnabled())
  @@ -714,7 +719,6 @@
   
   }
   
  -
   /**
* Prepare for the beginning of active use of the public methods of this
* component.  This method should be called after codeconfigure()/code,
  @@ -725,13 +729,14 @@
*/
   public void start() throws LifecycleException {
   
  -if (log.isDebugEnabled())
  -log.debug(Starting);
  -
  +if( ! initialized )
  +init();
  +
   // Validate and update our current component state
  -if (started)
  -throw new LifecycleException
  -(sm.getString(standardManager.alreadyStarted));
  +if (started) {
  +log.info(sm.getString(standardManager.alreadyStarted));
  +return;
  +}
   lifecycle.fireLifecycleEvent(START_EVENT, null);
   started = true;
   
  @@ -767,7 +772,7 @@
   
   if (log.isDebugEnabled())
   log.debug(Stopping);
  -
  +
   // Validate and update our current component state
   if (!started)
   throw new LifecycleException
  @@ -801,6 +806,9 @@
   // Require a new random number generator if we are restarted
   this.random = null;
   
  +if( initialized ) {
  +destroy();
  +}
   }
   
   
  @@ -965,4 +973,6 @@
   }
   
   }
  +
  +
   }
  
  
  

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



cvs commit: jakarta-tomcat-5/resources/mbeans tomcat5-ant.xml

2003-03-17 Thread costin
costin  2003/03/17 11:28:19

  Modified:resources/mbeans tomcat5-ant.xml
  Log:
  More friendly startup for the console ( detect jmxri or mx4j )
  
  Removed service
  
  Added /admin ( commented out for now )
  
  Revision  ChangesPath
  1.6   +30 -7 jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml
  
  Index: tomcat5-ant.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tomcat5-ant.xml   12 Mar 2003 15:48:45 -  1.5
  +++ tomcat5-ant.xml   17 Mar 2003 19:28:18 -  1.6
  @@ -22,6 +22,14 @@
   taskdef resource=org/apache/commons/modeler/ant/ant.properties
classpathref=tomcatCP /
   property name=init.done value=true/
  +
  +available classname=com.sun.jdmk.comm.HtmlAdaptorServer
  +   property=jmxritools-available 
  +   classpathref=tomcatCP /
  +
  +available classname=mx4j.adaptor.http.XSLTProcessor
  +   property=mx4jtools-available 
  +   classpathref=tomcatCP /
 /target
   
   
  @@ -29,7 +37,12 @@
  Call this target if you want the console added.
   --
   
  -  target name=jmx-console-ri depends=init description=Enable JMX-RI console ( 
web interface ) 
  +  target name=jmx-console depends=jmx-console-ri,jmx-console-mx4j /
  +
  +  target name=jmx-console-ri 
  +  depends=init 
  +  description=Enable JMX-RI console ( web interface ) 
  +  if=jmxritools-available
   
   jmx-service
 mbean code=com.sun.jdmk.comm.HtmlAdaptorServer
  @@ -40,7 +53,10 @@
   
 /target
   
  -  target name=jmx-console-mx4j depends=init description=Enable JMX console ( 
mx4j ) 
  +  target name=jmx-console-mx4j 
  +  depends=init 
  +  description=Enable JMX console ( mx4j ) 
  +  if=mx4jtools-available
   
   jmx-service
 mbean code=mx4j.adaptor.http.XSLTProcessor
  @@ -75,7 +91,7 @@
 /target
   
   
  -  target name=run2 depends=init
  +  target name=run2 depends=init,jmx-console
   description=Start tomcat as an mbean, no server.xml
   
   modelerRegistry resource=org/apache/catalina/mbeans/mbeans-descriptors.xml /
  @@ -86,14 +102,14 @@
 Should be optional - but the name is used in several places.
 The whole name should disapear - use domain instead
   --
  -   mbean name=${domain}:type=Service,name=Tomcat-Standalone 
  +   mbean name=${domain}:type=Service 
 code=org.apache.catalina.core.StandardService
 modeler=true
attribute name=name value=Tomcat-Standalone/
  /mbean
   
   
  -   mbean name=${domain}:type=Engine,name=Tomcat-Standalone 
  +   mbean name=${domain}:type=Engine 
 code=org.apache.catalina.core.StandardEngine
 modeler=true
attribute name=name value=Tomcat-Standalone/
  @@ -101,7 +117,7 @@
attribute name=defaultHost value=localhost/
  /mbean
   
  -   mbean name=${domain}:type=Realm,service=Tomcat-Standalone 
  +   mbean name=${domain}:type=Realm 
 code=org.apache.catalina.realm.JAASRealm modeler=true
  /mbean
   
  @@ -132,7 +148,7 @@
   
   !-- Optional: when the context is created it'll create a host if none is found.
   --
  -   mbean name=${domain}:type=Host,host=localhost,service=Tomcat-Standalone 
  +   mbean name=${domain}:type=Host,host=localhost 
 code=org.apache.catalina.core.StandardHost modeler=true
attribute name=name value=localhost/
  /mbean
  @@ -159,6 +175,13 @@
attribute name=privileged value=true /
  /mbean
   
  +!--
  +   mbean 
name=${domain}:j2eeType=WebModule,name=//localhost/admin,J2EEApplication=none,J2EEServer=none
 
  +  code=org.apache.catalina.core.StandardContext  modeler=true
  + attribute name=docBase value=/opt/50/server/webapps/admin /
  + attribute name=privileged value=true /
  +   /mbean
  +--
   
   /jmx-service
   
  
  
  

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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java

2003-03-17 Thread Filip Hanik
Hi Costin,
haven't had time to review these changes, will they affect the clustering 
implementation of 
the manager that extends StandardManager in there?

Filip

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 11:25 AM
 To: [EMAIL PROTECTED]
 Subject: cvs commit:
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session
 ManagerBase.java
 
 
 costin  2003/03/17 11:24:35
 
   Modified:catalina/src/share/org/apache/catalina/session
 ManagerBase.java
   Log:
   Registration
   
   Revision  ChangesPath
   1.14  +33 -2 
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina
 /session/ManagerBase.java
   
   Index: ManagerBase.java
   ===
   RCS file: 
 /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach
e/catalina/session/ManagerBase.java,v
   retrieving revision 1.13
   retrieving revision 1.14
   diff -u -r1.13 -r1.14
   --- ManagerBase.java21 Jan 2003 00:43:18 -  1.13
   +++ ManagerBase.java17 Mar 2003 19:24:35 -  1.14
   @@ -87,9 +87,12 @@
import org.apache.catalina.Engine;
import org.apache.catalina.Manager;
import org.apache.catalina.Session;
   +import org.apache.catalina.core.StandardContext;
   +import org.apache.catalina.core.StandardHost;
import org.apache.catalina.util.StringManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
   +import org.apache.commons.modeler.Registry;


/**
   @@ -223,6 +226,8 @@
// number of duplicated session ids - anything 0 
 means we have problems
protected int duplicates=0;

   +protected boolean initialized=false;
   +
/**
 * The string manager for this package.
 */
   @@ -603,7 +608,33 @@


// 
 - 
 Public Methods
   -
   +public void destroy() {
   +if( oname != null )
   +Registry.getRegistry().unregisterComponent(oname);
   +initialized=false;
   +}
   +
   +public void init() {
   +if( initialized ) return;
   +initialized=true;
   +
   +if( oname==null ) {
   +try {
   +StandardContext 
 ctx=(StandardContext)this.getContainer();
   +Engine eng=(Engine)ctx.getParent().getParent();
   +domain=eng.getName();
   +StandardHost hst=(StandardHost)ctx.getParent();
   +
   +oname=new ObjectName(domain + :type=Manager,path=
   ++ ctx.getPath() + ,host= + hst.getName());
   +
 Registry.getRegistry().registerComponent(this, oname, null );
   +} catch (Exception e) {
   +log.error(Error registering ,e);
   +}
   +}
   +log.info(Registering  + oname );
   +   
   +}

/**
 * Add this Session to the set of active Sessions for 
 this Manager.
   
   
   
 
 -
 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: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
   
   I'm trying a different path that will reduce the breakage 
 and make /admin
   work with embeded as well.
   Basically I'm creating the Service and Server, even for 
 embeded ( where only
   engine is used ). That will make the model consistent - 
 even if Server and Service
   are barely used.
   

Is the embedded working in 5.0?
I've kill myself trying to make that operable, and the only one I've
succeeded is the 4.0.6, but only when I put the entire distribution in a
single jar or unpack all the classes, or make a 4k classpath.

By the way, can we make a build for 5.0 that will be like sun's j2ee?

MT.


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



DO NOT REPLY [Bug 17997] - JspC's webapp switch does not expand package names

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17997.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

JspC's webapp switch does not expand package names





--- Additional Comments From [EMAIL PROTECTED]  2003-03-17 19:46 ---
I've found the same problem.  My webapp uses the same JSP filename in 
different subdirectories which results in errors.

I updated by JspC.java file as follows:

Added the following two lines to the public boolean processFile(String file) 
method:

String packageSuffix = jspUri.substring(0, jspUri.lastIndexOf('/')).replace
('/','.');
clctxt.setServletPackageName(clctxt.getServletPackageName() + packageSuffix);


I added the two lines right before the line:

setupContext(clcText);

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



cvs commit: jakarta-tomcat-5 build.properties.default

2003-03-17 Thread jfarcand
jfarcand2003/03/17 11:56:50

  Modified:.build.properties.default
  Log:
  For backward compatilitity ;-), set the base.path=/usr/local like it was before.
  
  ../repository fail with common-el, jakarta-servletapi-5 because those repositories 
need to use ../../repository to works.
  
  Revision  ChangesPath
  1.80  +2 -2  jakarta-tomcat-5/build.properties.default
  
  Index: build.properties.default
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.properties.default,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- build.properties.default  14 Mar 2003 20:21:04 -  1.79
  +++ build.properties.default  17 Mar 2003 19:56:49 -  1.80
  @@ -37,7 +37,7 @@
   # - Default Base Path for Dependent Packages -
   #base.path=/usr/share/java
   #base.path=../repository
  -
  +base.path=/usr/local
   
   # --
   #REQUIRED LIBRARIES
  
  
  

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



cvs commit: jakarta-tomcat-5 build.xml

2003-03-17 Thread amyroh
amyroh  2003/03/17 12:06:19

  Modified:.build.xml
  Log:
  This fixes my build.  I'm not sure why this is commented out but let me know
  if this causes a problem.
  
  Revision  ChangesPath
  1.114 +1 -2  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.113
  retrieving revision 1.114
  diff -u -r1.113 -r1.114
  --- build.xml 15 Mar 2003 09:04:52 -  1.113
  +++ build.xml 17 Mar 2003 20:06:18 -  1.114
  @@ -145,8 +145,7 @@
 target name=build-servletapi unless=servletapi.build.notrequired 
   echo== Building: ${servlet-api.jar}/echo
   ant dir=${api.home}/jsr154 target=dist 
  -!--property name=servlet-api.dist value=${servlet-api.home} /
  - --
  +  property name=servlet-api.dist value=${servlet-api.home} /
   /ant
   mkdir dir=${servlet-api.home}/
   copy todir=${servlet-api.home}
  
  
  

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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java

2003-03-17 Thread Costin Manolache
Filip Hanik wrote:

 Hi Costin,
 haven't had time to review these changes, will they affect the clustering
 implementation of the manager that extends StandardManager in there?

Just make sure start() calls super.start(), or has:
  if( ! initialized ) 
 super.init()

You may want to add a file mbeans-descripors.xml in the same package -
with the attributes and operations you want to expose and their
description. This is optional - if you don't, introspection will be used
and all simple attributes and operations will be exposed ( but no
description )

Costin


 
 Filip
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 11:25 AM
 To: [EMAIL PROTECTED]
 Subject: cvs commit:
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session
 ManagerBase.java
 
 
 costin  2003/03/17 11:24:35
 
   Modified:catalina/src/share/org/apache/catalina/session
 ManagerBase.java
   Log:
   Registration
   
   Revision  ChangesPath
   1.14  +33 -2
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina
 /session/ManagerBase.java
   
   Index: ManagerBase.java
   ===
   RCS file:
 /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach
 e/catalina/session/ManagerBase.java,v
   retrieving revision 1.13
   retrieving revision 1.14
   diff -u -r1.13 -r1.14
   --- ManagerBase.java   21 Jan 2003 00:43:18 -  1.13
   +++ ManagerBase.java   17 Mar 2003 19:24:35 -  1.14
   @@ -87,9 +87,12 @@
import org.apache.catalina.Engine;
import org.apache.catalina.Manager;
import org.apache.catalina.Session;
   +import org.apache.catalina.core.StandardContext;
   +import org.apache.catalina.core.StandardHost;
import org.apache.catalina.util.StringManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
   +import org.apache.commons.modeler.Registry;


/**
   @@ -223,6 +226,8 @@
// number of duplicated session ids - anything 0
 means we have problems
protected int duplicates=0;

   +protected boolean initialized=false;
   +
/**
 * The string manager for this package.
 */
   @@ -603,7 +608,33 @@


//
 -
 Public Methods
   -
   +public void destroy() {
   +if( oname != null )
   +Registry.getRegistry().unregisterComponent(oname);
   +initialized=false;
   +}
   +
   +public void init() {
   +if( initialized ) return;
   +initialized=true;
   +
   +if( oname==null ) {
   +try {
   +StandardContext
 ctx=(StandardContext)this.getContainer();
   +Engine eng=(Engine)ctx.getParent().getParent();
   +domain=eng.getName();
   +StandardHost hst=(StandardHost)ctx.getParent();
   +
   +oname=new ObjectName(domain + :type=Manager,path=
   ++ ctx.getPath() + ,host= + hst.getName());
   +
 Registry.getRegistry().registerComponent(this, oname, null );
   +} catch (Exception e) {
   +log.error(Error registering ,e);
   +}
   +}
   +log.info(Registering  + oname );
   +
   +}

/**
 * Add this Session to the set of active Sessions for
 this Manager.
   
   
   
 
 -
 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: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session ManagerBase.java

2003-03-17 Thread Filip Hanik
thanks a bunch

 -Original Message-
 From: Costin Manolache [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 17, 2003 12:32 PM
 To: [EMAIL PROTECTED]
 Subject: RE: cvs commit:
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session
 ManagerBase.java
 
 
 Filip Hanik wrote:
 
  Hi Costin,
  haven't had time to review these changes, will they affect 
 the clustering
  implementation of the manager that extends StandardManager in there?
 
 Just make sure start() calls super.start(), or has:
   if( ! initialized ) 
  super.init()
 
 You may want to add a file mbeans-descripors.xml in the 
 same package -
 with the attributes and operations you want to expose and their
 description. This is optional - if you don't, introspection 
 will be used
 and all simple attributes and operations will be exposed ( but no
 description )
 
 Costin
 
 
  
  Filip
  
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Monday, March 17, 2003 11:25 AM
  To: [EMAIL PROTECTED]
  Subject: cvs commit:
  
 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session
  ManagerBase.java
  
  
  costin  2003/03/17 11:24:35
  
Modified:catalina/src/share/org/apache/catalina/session
  ManagerBase.java
Log:
Registration

Revision  ChangesPath
1.14  +33 -2
  jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina
  /session/ManagerBase.java

Index: ManagerBase.java

 ===
RCS file:
  /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach
  e/catalina/session/ManagerBase.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ManagerBase.java   21 Jan 2003 00:43:18 -  1.13
+++ ManagerBase.java   17 Mar 2003 19:24:35 -  1.14
@@ -87,9 +87,12 @@
 import org.apache.catalina.Engine;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Session;
+import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.util.StringManager;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.commons.modeler.Registry;
 
 
 /**
@@ -223,6 +226,8 @@
 // number of duplicated session ids - anything 0
  means we have problems
 protected int duplicates=0;
 
+protected boolean initialized=false;
+
 /**
  * The string manager for this package.
  */
@@ -603,7 +608,33 @@
 
 
 //
  -
  Public Methods
-
+public void destroy() {
+if( oname != null )
+Registry.getRegistry().unregisterComponent(oname);
+initialized=false;
+}
+
+public void init() {
+if( initialized ) return;
+initialized=true;
+
+if( oname==null ) {
+try {
+StandardContext
  ctx=(StandardContext)this.getContainer();
+Engine eng=(Engine)ctx.getParent().getParent();
+domain=eng.getName();
+StandardHost hst=(StandardHost)ctx.getParent();
+
+oname=new ObjectName(domain + 
 :type=Manager,path=
++ ctx.getPath() + ,host= + hst.getName());
+
  Registry.getRegistry().registerComponent(this, oname, null );
+} catch (Exception e) {
+log.error(Error registering ,e);
+}
+}
+log.info(Registering  + oname );
+
+}
 
 /**
  * Add this Session to the set of active Sessions for
  this Manager.



  
  
 -
  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: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
   
   I'm trying a different path that will reduce the breakage
 and make /admin
   work with embeded as well.
   Basically I'm creating the Service and Server, even for
 embeded ( where only
   engine is used ). That will make the model consistent -
 even if Server and Service
   are barely used.
   
 
 Is the embedded working in 5.0?
 I've kill myself trying to make that operable, and the only one I've
 succeeded is the 4.0.6, but only when I put the entire distribution in a
 single jar or unpack all the classes, or make a 4k classpath.

 By the way, can we make a build for 5.0 that will be like sun's j2ee?

What do you mean ? A single jar ? I don't think that's a good idea :-)
( but it should work, as well as a flat jar directory - that's what 
embed uses )

If you execute the emebed target in tomcat5, you'll get an embed/
dir, and inside you'll have a lib/ with an ( almost ) minimal set
of jars - you can rejar them in a single jar if you really want.

The tomcat-ant.xml file is a sample on how to embed tomcat - all you
have to do is to make the same JMX calls in your favorite application
( where you embed tomcat ).

In other words - you'll need to create o.a.commons.modeler.BaseModelMBean
components, with a String constructor ( the name of the tomcat class ). Then
set all the attributes you want, and call init()/start().

Get it first working with ant, it's easier.

It works for me :-)

Costin


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



DO NOT REPLY [Bug 18079] New: - Documentation error: configuration of resource caching (BaseDirContext).

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18079.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Documentation error: configuration of resource caching (BaseDirContext).

   Summary: Documentation error: configuration of resource caching
(BaseDirContext).
   Product: Tomcat 4
   Version: 4.1.18
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


According to online documentation, to de-activate caching of resources, we must
use the cached attribute of Resources element (nested in a Context element).  

Context path=/mypath docBase=/usr/local/mylocation

  Resources className=org.apache.naming.resources.FileDirContext 
 cached=false/

/Context

This is incorrect.  The org.apache.catalina.core.StandardContext will set the
caching value on the DirContext to the same value specified in the undocumented
cachingAllowed attribute of Context (which default to true):

(from org/apache/catalina/core/StandardContext.java)

 public synchronized void setResources(DirContext resources) {

if (started) {
throw new IllegalStateException
(sm.getString(standardContext.resources.started));
}

DirContext oldResources = this.webappResources;
if (oldResources == resources)
return;

if (resources instanceof BaseDirContext) {
((BaseDirContext) resources).setCached(isCachingAllowed());
}
if (resources instanceof FileDirContext) {
filesystemBased = true;
}
this.webappResources = resources;

// The proxied resources will be refreshed on start
this.resources = null;

support.firePropertyChange(resources, oldResources,
   this.webappResources);

}

Because of that, the cached attribute of the Resources element is useless. 
The only way to de-activate caching is to disable it at the context level:

Context path=/mypath docBase=/usr/local/mylocation
 cachingAllowed=false/

I think the correct behaviour would be to logical-AND the cachingAllowed
property of the Context and the cached property of the DirContext.

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalinaServerFactory.java

2003-03-17 Thread Remy Maucherat
Mladen Turk wrote:
 I'm trying a different path that will reduce the breakage 
and make /admin
 work with embeded as well.
 Basically I'm creating the Service and Server, even for 
embeded ( where only
 engine is used ). That will make the model consistent - 
even if Server and Service
 are barely used.
 


Is the embedded working in 5.0?
I've kill myself trying to make that operable, and the only one I've
succeeded is the 4.0.6, but only when I put the entire distribution in a
single jar or unpack all the classes, or make a 4k classpath.
By the way, can we make a build for 5.0 that will be like sun's j2ee?
Just wanted to let you know that the new embedded in 5.0 is great. 
Costin (and I, to some extent) got it running with JBoss 3.2 without any 
problem. The big advantage is that it's just like Tomcat standalone, 
except it also implements the Embedded API. The big trick however is 
that if the embbedding component uses JMX already, you can do everything 
using MBeans. It's really cool :)

Remy

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


RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
 If you execute the emebed target in tomcat5, you'll get an 
 embed/ dir, and inside you'll have a lib/ with an ( almost ) 
 minimal set of jars - you can rejar them in a single jar if 
 you really want.
 

What I ment was a catalina.bat or catalina.sh embedded
calling o.a.c.s.Embedded

 The tomcat-ant.xml file is a sample on how to embed tomcat - 
 all you have to do is to make the same JMX calls in your 
 favorite application ( where you embed tomcat ).
 
 In other words - you'll need to create 
 o.a.commons.modeler.BaseModelMBean
 components, with a String constructor ( the name of the 
 tomcat class ). Then set all the attributes you want, and 
 call init()/start().
 
 Get it first working with ant, it's easier.
 

I'll try.

 It works for me :-)
 
Cool ;-)

MT.


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



cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java

2003-03-17 Thread costin
costin  2003/03/17 12:53:40

  Modified:jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch
JspC.java
  Log:
  I don't know if this can make it into the release - but I can't get jspc to
  work as an ant task without this.
  The problem is that struts is using the thread class loader to locate some
  classes at compile time ( which is correct ), and we don't have it set.
  
  Feel free to revert if it causes any problem or if you have a better solution.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.12.2.6  +4 -3  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.12.2.5
  retrieving revision 1.12.2.6
  diff -u -r1.12.2.5 -r1.12.2.6
  --- JspC.java 7 Mar 2003 09:09:37 -   1.12.2.5
  +++ JspC.java 17 Mar 2003 20:53:39 -  1.12.2.6
  @@ -773,6 +773,7 @@
   initServletContext();
  
   initWebXml();
  +Thread.currentThread().setContextClassLoader( 
this.getClass().getClassLoader() );
   
   Enumeration e = pages.elements();
   while (e.hasMoreElements()) {
  
  
  

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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED] 
 
 Just wanted to let you know that the new embedded in 5.0 is great. 
 Costin (and I, to some extent) got it running with JBoss 3.2 
 without any 
 problem. The big advantage is that it's just like Tomcat standalone, 
 except it also implements the Embedded API. The big trick however is 
 that if the embbedding component uses JMX already, you can do 
 everything 
 using MBeans. It's really cool :)
 

Well that's great, can you send some cookbook?

I'd like to make a class for JK2 that will call the embedded TC from
_dirty_ JVM, something like LouncherBootstrap.
The class will be in that case be injected in JVM from class file itself
using DefineClass.


MT.



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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalinaServerFactory.java

2003-03-17 Thread Remy Maucherat
Mladen Turk wrote:

-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED] 

Just wanted to let you know that the new embedded in 5.0 is great. 
Costin (and I, to some extent) got it running with JBoss 3.2 
without any 
problem. The big advantage is that it's just like Tomcat standalone, 
except it also implements the Embedded API. The big trick however is 
that if the embbedding component uses JMX already, you can do 
everything 
using MBeans. It's really cool :)



Well that's great, can you send some cookbook?

I'd like to make a class for JK2 that will call the embedded TC from
_dirty_ JVM, something like LouncherBootstrap.
The class will be in that case be injected in JVM from class file itself
using DefineClass.
Here's the JBoss integration class. This should give you an idea.
Note that the class can be compiled independently of TC 5. Zero coupling :)
Costin is awesome :-D
Well, except when he's doing build related stuff, of course ;-)
Remy
/*
 * JBoss, the OpenSource WebOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.web.catalina;

import java.io.File;
import java.io.FileInputStream;
import java.net.URL;

import org.jboss.deployment.DeploymentException;
import org.jboss.metadata.WebMetaData;
import org.jboss.util.file.JarUtils;
import org.jboss.web.AbstractWebContainer;
import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
import org.jboss.web.WebApplication;

import javax.management.MBeanServerFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.management.Attribute;

/** 
 * An implementation of the AbstractWebContainer for the Jakarta Tomcat5
 * servlet container. It has no code dependency on tomcat - only the new JMX
 * model is used.
 * 
 * Tomcat5 is organized as a set of mbeans - just like jboss.
 * 
 * @see AbstractWebContainer
 * 
 * @author [EMAIL PROTECTED]
 * @authro Costin Manolache
 * @version $Revision: 1.1.2.2 $
 */
public class Tomcat5 extends AbstractWebContainer
   implements Tomcat5MBean
{
// Constants -
public static final String NAME = EmbeddedTomcat5;

// XXX We could make this configurable - so it can support other containers
// that provide JMX-based deployment.
private String contextClassName=org.apache.catalina.core.StandardContext;

/** Domain for tomcat5 mbeans */
private String catalinaDomain=Catalina;

public Tomcat5()
{
}

public String getName()
{
return NAME;
}

public String getDomain()
{
return this.catalinaDomain;
}

/** The most important atteribute - defines the managed domain.
 *  A catalina instance (engine) corresponds to a JMX domain, that's
 *  how we know where to deploy webapps.
 *
 * @param catalinaHome
 */
public void setDomain(String catalinaHome)
{
this.catalinaDomain = catalinaHome;
}

public void setContextMBeanCode(String className) {
}

public String getContextMBeanCode() {
return null;
}


public void startService() throws Exception
{
// Start create the embeded catalina container but don't let it overwrite the 
thread class loader
ClassLoader cl = Thread.currentThread().getContextClassLoader();
ClassLoader parent = cl;

// This is a workaround for jasper - we need the jars in the repository.
// Probably a better solution would be to fix jasper to better detect
// the env.
StringBuffer cp=new StringBuffer();
String sep=System.getProperty(path.separator);
while( parent != null )
{
log.trace(parent);
URL[] urls = super.getClassLoaderURLs(parent);
for(int u = 0; u  urls.length; u ++) {
if( log.isTraceEnabled())
log.trace(  +urls[u]);
cp.append(sep).append( urls[u].getPath());
}
parent = parent.getParent();
}
System.setProperty(java.class.path, cp.toString());

log.info(Setting classpath  + cp);

// Other workarounds ???
// Note that tomcat has its own life as a generic service - we don't
// interfere, just deploy using regular plain JMX

// Invoke the super method to register as a deployer
super.startService();
}

public void stopService() throws Exception
{
super.stopService();
// nothing special here - tomcat is started by an mbean service,
// it has its own life
}

/** Perform the tomcat specific deployment steps.
 */
protected void performDeploy(WebApplication appInfo, String warUrl,
 WebDescriptorParser webAppParser) throws Exception
{
WebMetaData metaData = appInfo.getMetaData();

String ctxPath = metaData.getContextRoot();
if( ctxPath.equals(/) || 

RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 What I ment was a catalina.bat or catalina.sh embedded
 calling o.a.c.s.Embedded

I think Embedded class should be deprecated in 5.0, and all
'embedding' should be done via JMX.

I haven't tested Embedded recently ( but it was working about a 
week ago ). 

You can create your own main() ( or use the small startup class in
modeler ) and load an mbeans.xml file. 

Controlling everything via JMX is much more flexible and powerfull
than using wrappers or helpers like Embedded.

Costin


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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 
 
 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]
 
 Just wanted to let you know that the new embedded in 5.0 is great.
 Costin (and I, to some extent) got it running with JBoss 3.2
 without any
 problem. The big advantage is that it's just like Tomcat standalone,
 except it also implements the Embedded API. The big trick however is
 that if the embbedding component uses JMX already, you can do
 everything
 using MBeans. It's really cool :)
 
 
 Well that's great, can you send some cookbook?
 
 I'd like to make a class for JK2 that will call the embedded TC from
 _dirty_ JVM, something like LouncherBootstrap.
 The class will be in that case be injected in JVM from class file itself
 using DefineClass.

Sounds complicated :-) What is a 'dirty' JVM ? And what's the use case ?

For JK2, the code is already organized as almost independent MBeans - 
and in time we should increase this - ChannelSocket and many other
pieces should be made completely reusable ( for example it would be nice
to use it for HTTP as well ). 

JkMain was the model for the modeler Main - and I'll try to write a 
modeler source that supports a simple .properties ( jk2.properties is a sort
of mbeans.xml - and JkMain loades sort-of mbeans )

Costin


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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
You may notice that the JNDI stuff is not yet finished, and I haven't tested
the authentication ( JAAS realm works fine with our LoginModule, but it may
still have some non-standard behaviors it relies on ). Well - I wrote the 
code that would support the more sane pattern used by jboss for Principals
( the Group named roles ), but it needs to be tested.

Costin

Remy Maucherat wrote:

 Mladen Turk wrote:
 
-Original Message-
From: Remy Maucherat [mailto:[EMAIL PROTECTED]

Just wanted to let you know that the new embedded in 5.0 is great.
Costin (and I, to some extent) got it running with JBoss 3.2
without any
problem. The big advantage is that it's just like Tomcat standalone,
except it also implements the Embedded API. The big trick however is
that if the embbedding component uses JMX already, you can do
everything
using MBeans. It's really cool :)

 
 
 Well that's great, can you send some cookbook?
 
 I'd like to make a class for JK2 that will call the embedded TC from
 _dirty_ JVM, something like LouncherBootstrap.
 The class will be in that case be injected in JVM from class file itself
 using DefineClass.
 
 
 Here's the JBoss integration class. This should give you an idea.
 Note that the class can be compiled independently of TC 5. Zero coupling
 :)
 
 Costin is awesome :-D
 Well, except when he's doing build related stuff, of course ;-)
 
 Remy



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



Re: mod_jk 1.2.3 release

2003-03-17 Thread Mike Anderson
I'm +1 for this as well and would like to get a fix in for the Apache modules.  I will 
be happy to build and post NetWare modules in either case.

I wanted to run my fix by Henri (and anyone else interested) first since he made the 
change based on a patch sent in.  Basically, the change was how mod_jk is filling in 
the port.  The change was from apr_sockaddr_port_get(port, r-connection-local_addr) 
(at least in the Apache 2 version - something similar in Apache 1.3) to 
ap_get_server_port(r).  The comment says something about /* XXX: à la jk2 */ but when 
I looked in the jk2 code, it is still doing it the old way (looking in 
JTC/jk/native2/server/apache2/jk_service_apache2.c).  In my testing, the new way only 
returns the default port for the server (i.e. the first Listen/Port directive) unless 
a VirtualHost section exists.  If I have multiple ports opened that are providing the 
same content without an explicit VirtualHost (very common on NetWare for 80 and 443), 
the ap_get_server_port always returns 80 (or whatever the default port is).  the 
apr_sockaddr_port_get appears to always return the correct port reguardless of whether 
or not there is a VirtualHost defined.

To make a long story short, I'd like to put this back to the original call which had 
the comment /* get the real port (otherwise redirect failed) */.  This has actually 
been validated in my testing.  I just didn't want to break someone else if there was a 
different reason for the patch.

Thanks,
Mike Anderson

 [EMAIL PROTECTED] 3/17/2003 6:50:31 AM 
Thanks.  It isn't ready yet.  I tried over the weekend running Apache 
2/mod_jk-1.2.3-dev
on a production site.  With my recent commits it is running much better, but it is 
still
failing at least once a day. Argh!  I'll have to go back once again and see if I can
reproduce the failure on a test system.

Glenn

Henri Gomez wrote:
 Glenn Nielsen wrote:
 


 Henri Gomez wrote:

 Glenn Nielsen wrote:

 It has been a while since a mod_jk 1.2 release was done.
 There have been a number of bug fixes and a few minor feature 
 enhancements.

 I just did some commits to fix some bugs I was seeing with mod_jk 
 1.2 and
 Apache 2.0.  Some of these will also improve the connector for other 
 web
 servers. (Better handling of aborted clients)

 I just upgraded one of our production sites from Apache 1.3 mod_jk 
 1.2.2 to
 Apache 2.0 mod_jk 1.2.3-dev.  So far everything is looking good.

 I really wanted to add support for using the APR to implement a global
 tomcat socket connector pool.  There just doesn't seem to be any easy
 way to do it without major code refactoring.  Argh!




 JK2 is our target, with APR +/- mandatory.

 Perhaps we could do a mod_jk 1.2.3 release in two weeks or so?

 That should give adequate time for testing.




 +0

 Good idea but don't have time to do the RI.

 Would you like doing it ?


 What is required to do the release?  Do you have any notes on how to do
 connector releases?
 
 
 The usual part are :
 
 - tag JTC
 
 - make a source tarball, and keep only jk related stuff
   (see the contents of jk 1.2.2 tarball)
 
 - make binaries (I'll do the linux, may be Nacho or Mladen could make
   the windows/IIS and Mike Anderson the netware.
 
 - Make the announce.
 
 The only platforms I could build binaries for is Solaris 7/8 x86/sparc.

 Regards,

 Glenn

 --
 Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder|
 MOREnet System Programming   |  * if iz ina coment.  |
 Missouri Research and Education Network  |  */   |
 --


 -
 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: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java

2003-03-17 Thread Costin Manolache
I don't know if the official build for 4.1.22/23 is done - but it would be
nice if we could include this fix for jspc.

I don't know any other way to compile an app using struts.

Remy - were you able to precompile /admin for 4.1.23 ? Do you plan to
include it precompiled, or the old way ?

Costin


[EMAIL PROTECTED] wrote:

 costin  2003/03/17 12:53:40
 
   Modified:jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch
 JspC.java
   Log:
   I don't know if this can make it into the release - but I can't get jspc
   to work as an ant task without this.
   The problem is that struts is using the thread class loader to locate
   some classes at compile time ( which is correct ), and we don't have it
   set.
   
   Feel free to revert if it causes any problem or if you have a better
   solution.
   
   Revision  ChangesPath
   No   revision
   
   
   No   revision
   
   
   1.12.2.6  +4 -3 
   jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
   
   Index: JspC.java
   ===
   RCS file:
  
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
   retrieving revision 1.12.2.5 retrieving revision 1.12.2.6
   diff -u -r1.12.2.5 -r1.12.2.6
   --- JspC.java   7 Mar 2003 09:09:37 -   1.12.2.5
   +++ JspC.java   17 Mar 2003 20:53:39 -  1.12.2.6
   @@ -773,6 +773,7 @@
initServletContext();
   
initWebXml();
   +Thread.currentThread().setContextClassLoader(
   this.getClass().getClassLoader() );

Enumeration e = pages.elements();
while (e.hasMoreElements()) {



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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
  What I ment was a catalina.bat or catalina.sh embedded calling 
  o.a.c.s.Embedded
 
 I think Embedded class should be deprecated in 5.0, and all 
 'embedding' should be done via JMX.
 
 I haven't tested Embedded recently ( but it was working about a 
 week ago ). 
 
 You can create your own main() ( or use the small startup 
 class in modeler ) and load an mbeans.xml file. 
 
 Controlling everything via JMX is much more flexible and 
 powerfull than using wrappers or helpers like Embedded.
 

Well what I want to do is TC distribution from JK2 point of view, where
I will install the TC into the web server, and not adapt the web server
to Tomcat.

Want I need is a single java class that will be loaded from bytes,
launch the 'light' TC without it's own http server, set all the
configuration from workers2.properties, ... Think you follow me.

The problem is that all that has to be able to start from _dirty_ JVM,
meaning that the web server already has loaded JVM, with the different
classpath from the one that I want.

Do you have some leads on that?

MT.


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



/admin - what needs to be done

2003-03-17 Thread Costin Manolache
The biggest change will be getting rid of all direct references and casts to
catalina classes - and use JMX consistently.

The other problem is the hardcoded Catalina: domain.

I started to fix Server and other classes to help the migration - it'll have
a fixed name: Catalina:type=Server. It'll have a serviceNames attribute
with the list of ObjectName of all services in the system.

/admin can start with the known Server name, then get the list of services
and so on.

It should _never_ do direct calls to any tomcat class - only JMX 

When we get the remote-JMX working - various tomcat instances in the cluster
will be visible as MBeans - but obviously casting can't work.

Also, the whole save operation from Server will have to move to Service or
Engine, and we need to figure a way to save only local Services.


The other solution would be to have multiple Server mbeans - but that may
require more changes. 


Basically: the Server in the tomcat instance running /admin will list as 
services all local Services as well as mbean proxies for all Services in 
the cluster. I'm not sure how can we deal with saving in the case of remote
Services - probably just moving the save() operation to Service and adding
a flag for local Services will be enough. 
That's low priority for now - we need to get the rest working for single
instance first

Costin


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



Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasperJspC.java

2003-03-17 Thread Remy Maucherat
Costin Manolache wrote:
I don't know if the official build for 4.1.22/23 is done - but it would be
nice if we could include this fix for jspc.
I don't know any other way to compile an app using struts.

Remy - were you able to precompile /admin for 4.1.23 ? Do you plan to
include it precompiled, or the old way ?
I released the build, but forgot to tag (I'm a bit sick ...).
I'll rebuild with the patch.
Remy

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


DO NOT REPLY [Bug 18080] New: - RequestDispatcher forward problem in servlets

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18080.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

RequestDispatcher forward problem in servlets

   Summary: RequestDispatcher forward problem in servlets
   Product: Tomcat 4
   Version: 4.1.18
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Servlet  JSP API
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have a servlet which is called on submitting of a form which in turn forwards 
the request to a JSP.
RequestDispatcher rd = getServletConfig().getServletContext
().getRequestDispatcher(/test.jsp);
rd.forward(request, response);
System.out.println(Exiting);

After the forward statement is executed,control is transferred back to the 
servlet.But the specs says that control will never be transferred back after 
using forward statement.
Is this a bug in Tomcat?

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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Costin Manolache
Mladen Turk wrote:

 
 
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
  What I ment was a catalina.bat or catalina.sh embedded calling
  o.a.c.s.Embedded
 
 I think Embedded class should be deprecated in 5.0, and all
 'embedding' should be done via JMX.
 
 I haven't tested Embedded recently ( but it was working about a
 week ago ).
 
 You can create your own main() ( or use the small startup
 class in modeler ) and load an mbeans.xml file.
 
 Controlling everything via JMX is much more flexible and
 powerfull than using wrappers or helpers like Embedded.
 
 
 Well what I want to do is TC distribution from JK2 point of view, where
 I will install the TC into the web server, and not adapt the web server
 to Tomcat.
 
 Want I need is a single java class that will be loaded from bytes,
 launch the 'light' TC without it's own http server, set all the
 configuration from workers2.properties, ... Think you follow me.
 
 The problem is that all that has to be able to start from _dirty_ JVM,
 meaning that the web server already has loaded JVM, with the different
 classpath from the one that I want.
 
 Do you have some leads on that?

Well - you need at least something in the classpath :-) That something can
create a class loader with all the other jars - and call a method inside.

What you should call is Registry.loadMBeans() or ant or something like that
- which in turn will load an mbeans.xml file ( either ant tasks or just
extended mlet or even plain mlet ).

The target is to allow it to start with only jmx.jar, commons-modeler.jar,
an xml parser - but I need to implement a class loader in modeler ( so
classpath can be declared in mbeans.xml ). If you use ant as JMX controler
- that should work fine - and you'll need ant.jar. jmx.jar,
commons-modeler.jar and a parser in your path.

Costin   










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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalinaServerFactory.java

2003-03-17 Thread Amy Roh
Costin Manolache wrote:
Mladen Turk wrote:


What I ment was a catalina.bat or catalina.sh embedded
calling o.a.c.s.Embedded


I think Embedded class should be deprecated in 5.0, and all
'embedding' should be done via JMX.
-1 for deprecating the current Embedded class.

I totally agree that JMX is very flexible and powerful way to go and I 
think it's great. :-)  However, for backward compatibility I don't think 
we should just deprecate it easily and force whoever was using tomcat 
Embedded class to change his/her implementation to use JMX.

Amy

I haven't tested Embedded recently ( but it was working about a 
week ago ). 

You can create your own main() ( or use the small startup class in
modeler ) and load an mbeans.xml file. 

Controlling everything via JMX is much more flexible and powerfull
than using wrappers or helpers like Embedded.
Costin

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




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


DO NOT REPLY [Bug 18082] New: - Invalid port number (p1) No Port statement found

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18082.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Invalid port number (p1) No Port statement found

   Summary: Invalid port number (p1) No Port statement found
   Product: Tomcat 4
   Version: 4.1.18
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Blocker
  Priority: Other
 Component: Connector:Webapp
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Hello folks. Please excuse me if this is known issue or if I am posting in a 
wrong place.
 I have compiled httpd-2.0.44 and webapp from jakarta-tomcat-connectors-4.1.18-
src
All of compilation is fine and I think my configuration is correct too. When I 
try to startup apache I am getting:
Syntax error on line 1079 of /usr/local/apache2/conf/httpd.conf:
Invalid port number (p1) No Port statement found

In my httpd.conf I have (these are just main parts of config for this issue:
Listen 80
ServerName my.domain.com:80
LoadModule webapp_module modules/mod_webapp.so

and then for virtual host:

WebAppConnection warpConnection warp localhost:8008

in Virtual Host Directive:
WebAppDeploy /usr/local/tomcat/webapps/examples warpConnection /examples
..and like I mentioned apachectl throws error: Syntax error on line 1079 
of /usr/local/apache2/conf/httpd.conf:
Invalid port number (p1) No Port statement found

I belive webapp module is looking for Port statement/settings but Port 
statement is depriciated in httpd-2.0.44 and has been replaced with Listen 
statement. Please correct me if I am wrong or point out for any information 
regarding this. I appreciate your help.

--Alex
[EMAIL PROTECTED]

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



RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina ServerFactory.java

2003-03-17 Thread Mladen Turk


 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] On Behalf Of Costin Manolache
 
 Well - you need at least something in the classpath :-) That 
 something can create a class loader with all the other jars - 
 and call a method inside.


Why?
The java/lang/ClassLoader is all that I have.

 What you should call is Registry.loadMBeans() or ant or 
 something like that
 - which in turn will load an mbeans.xml file ( either ant 
 tasks or just extended mlet or even plain mlet ).
 

No .xml  co., all the config is set by the JNI.

 The target is to allow it to start with only jmx.jar, 
 commons-modeler.jar, an xml parser - but I need to implement 
 a class loader in modeler ( so classpath can be declared in 
 mbeans.xml ). If you use ant as JMX controler
 - that should work fine - and you'll need ant.jar. jmx.jar, 
 commons-modeler.jar and a parser in your path.
 

Remember I don't have nothing in the classpath.
I'm trying to start the TC simply with the following:

java SomeClass

MT.


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



Re: /admin - what needs to be done

2003-03-17 Thread Amy Roh
Costin Manolache wrote:
The biggest change will be getting rid of all direct references and casts to
catalina classes - and use JMX consistently.
I don't think admin uses direct references to catalina classes at all. 
It was planned so that managedResource attribute (which corresponds to 
mbean's catalina object) from all mbeans were removed from the 
descriptor so that admin doesn't have an access to the catalina objects. 
 :-)

It should _never_ do direct calls to any tomcat class - only JMX 
Yes.

Amy



Costin

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




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


DO NOT REPLY [Bug 18080] - RequestDispatcher forward problem in servlets

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18080.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

RequestDispatcher forward problem in servlets

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-03-17 23:32 ---
After a forward is done, control still continues in the method. This a
restriction of the Java language.

The Servlet spec says this:
Before the forward method of the RequestDispatcher interface returns, the
response content must be sent and committed, and closed by the servlet container.

That means after a forward() is performed the response is closed and you may not
be able to send any more information to the client. This allows a programmer to
perform any auditing or cleanup work.

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



DO NOT REPLY [Bug 18073] - gzip compression checks for wrong content type

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18073.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

gzip compression checks for wrong content type





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 00:53 ---
Created an attachment (id=5385)
Add method to extract the mime type from a content type. Everything before the first 
;.

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



DO NOT REPLY [Bug 18073] - gzip compression checks for wrong content type

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18073.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

gzip compression checks for wrong content type





--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 00:54 ---
Created an attachment (id=5386)
Remove the charset from the content type.

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



DO NOT REPLY [Bug 18073] - gzip compression checks for wrong content type

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18073.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

gzip compression checks for wrong content type

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Keywords||PatchAvailable



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 00:56 ---
I've added two (untested) simple patches which might solve this problem. Can somebody 
look at it and commit it (or not)?

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



DO NOT REPLY [Bug 16508] - Response is not being committed after RequestDispatcher forward

2003-03-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16508.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

Response is not being committed after RequestDispatcher forward

[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|Critical|Major



--- Additional Comments From [EMAIL PROTECTED]  2003-03-18 02:10 ---
Should have been marked Major not critical as it is a major loss of function 
not a loss of data or other issue.

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



cvs commit: jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session ReplicatedSession.java

2003-03-17 Thread fhanik
fhanik  2003/03/17 21:16:43

  Modified:modules/cluster/src/share/org/apache/catalina/cluster/session
ReplicatedSession.java
  Log:
  setting dirty flag on remove Attribute, forgot to override this method
  
  Revision  ChangesPath
  1.3   +7 -3  
jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java
  
  Index: ReplicatedSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/modules/cluster/src/share/org/apache/catalina/cluster/session/ReplicatedSession.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReplicatedSession.java25 Feb 2003 21:15:12 -  1.2
  +++ ReplicatedSession.java18 Mar 2003 05:16:42 -  1.3
  @@ -121,6 +121,10 @@
   
   
   
  +public void removeAttribute(String name) {
  +setIsDirty(true);
  +super.removeAttribute(name);
  +}
   
   /**
* see parent description,
  
  
  

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



Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasperJspC.java

2003-03-17 Thread Remy Maucherat
Remy Maucherat wrote:
Costin Manolache wrote:

I don't know if the official build for 4.1.22/23 is done - but it 
would be
nice if we could include this fix for jspc.

I don't know any other way to compile an app using struts.

Remy - were you able to precompile /admin for 4.1.23 ? Do you plan to
include it precompiled, or the old way ?


I released the build, but forgot to tag (I'm a bit sick ...).
I'll rebuild with the patch.
After further review, I am able to precompile the admin webapp without 
the patch. As such, I do not plan to replace the build with a new one, 
and 4.1.23 does not include your patch (which was committed after the 
release announcement).
I do not plan to include precompiled webapps with 4.1.x, to avoid the 
possibility of causing regressions, although I agree it appears to be 
working fine. Overall, it gives an outstanding user experience in Tomcat 5.

I have added the missing 4.1.23 tag. Sorry for the trouble.

Remy

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


Re: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasperJspC.java

2003-03-17 Thread Remy Maucherat
[EMAIL PROTECTED] wrote:
costin  2003/03/17 12:53:40

  Modified:jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch
JspC.java
  Log:
  I don't know if this can make it into the release - but I can't get jspc to
  work as an ant task without this.
  The problem is that struts is using the thread class loader to locate some
  classes at compile time ( which is correct ), and we don't have it set.
  
  Feel free to revert if it causes any problem or if you have a better solution.
The patch isn't present in the 5.0 codebase, and it appears to work fine.

I have to note that I had added the same code in 5.0 in my attempts to 
fix the issues with the tag files (before Kin-Man properly fixed it), 
and ran into a lot of CL errors because of it. So it could be causing 
issues.

We'll see if people can reproduce the precompilation problem with 4.1.23 
(I can't on JDK 1.4.1; which JDK are you using ?), and otherwise, I'd 
feel safer if the patch was reverted.

Remy

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


[ANN] Tomcat 4.1.23 Alpha released

2003-03-17 Thread Remy Maucherat
Tomcat 4.1.23 Alpha is now available for testing.

Changes over 4.1.22 include:
- Updated releases of all dependencies.
- Fix incorrect enumeration of sessions in JDBC store.
- Reject decoded URIs which don't start with '/', returning a 400.
- Auth request for an empty path (relative to the context root) will 
first redirect to '/', to avoid sharing auth information between contexts.

The release notes include the full list of changes.

Downloads:
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.23-alpha/
Remy

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