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

2003-07-14 Thread Remy Maucherat
Tim Funk wrote:

OK, just wanted to know if this was an 'oops' or just the way things 
are. I'll interpret that as the latter. ;)
If you have ideas on how to improve that, post them :)

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/coreStandardContext.java

2003-07-14 Thread Tim Funk
OK, just wanted to know if this was an 'oops' or just the way things are. 
I'll interpret that as the latter. ;)

-Tim

Remy Maucherat wrote:
Tim Funk wrote:

Sort of unrelated to the patch but noticed from line:
  File file = new File(configBase, name.replace('/', '_') + ".xml");
Would the following 2 names cause a confict if used at the same time?
1) name="more_cowbell";
2) name="more/cowbell";


Well, yes. You can't avoid all conflicts, so ...

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/coreStandardContext.java

2003-07-14 Thread Remy Maucherat
Tim Funk wrote:

Sort of unrelated to the patch but noticed from line:
  File file = new File(configBase, name.replace('/', '_') + ".xml");
Would the following 2 names cause a confict if used at the same time?
1) name="more_cowbell";
2) name="more/cowbell";
Well, yes. You can't avoid all conflicts, so ...

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/coreStandardContext.java

2003-07-14 Thread Tim Funk
Sort of unrelated to the patch but noticed from line:
  File file = new File(configBase, name.replace('/', '_') + ".xml");
Would the following 2 names cause a confict if used at the same time?
1) name="more_cowbell";
2) name="more/cowbell";
-Tim (waiting for coffee to brew before trying to think)

[EMAIL PROTECTED] wrote:
remm2003/07/14 03:54:11

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Strip out leading '/' for the context file name, for cosmetic reasons.
  
  Revision  ChangesPath
  1.70  +4 -1  jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- StandardContext.java	2 Jul 2003 22:00:34 -	1.69
  +++ StandardContext.java	14 Jul 2003 10:54:11 -	1.70
  @@ -3867,6 +3867,9 @@
   if (name.equals("")) {
   name = "ROOT";
   }
  +if (name.startsWith("/")) {
  +name = name.substring(1);
  +}
   File file = new File(configBase, name.replace('/', '_') + ".xml");
   setConfigFile(file.getPath());
   }


-
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/coreStandardContext.java

2003-06-16 Thread Remy Maucherat
Glenn Nielsen wrote:
[EMAIL PROTECTED] wrote:

remm2003/06/15 06:10:41

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Move context descriptors to
$CATALINA_BASE/conf//, as proposed by Glenn.
  - This should make the feature secure, and I think there's no 
justification
anymore for the deployXML flag.
  - Note: The manager webapp may need a few updates, which are in 
progress.
  


I haven't had a chance to review the code yet. I have a question about 
removing the
deployXML flag.  In your redesign will the ability to install a 
{context}.xml file
using an ant task or the web application manager still be available?  If 
so, then
for security the deployXML flag would still be needed.
Only the location of the XML context descriptors changes. That still 
allows defining stuff which goes in server.xml using the manager, and is 
"as dangerous" (IMO) as the admin webapp.
So that does give a good reason to keep the flag in :) I wasn't too sure 
about the change, so that's why I had left the flag in.

OTOH, the feature is a little bit better now, since you can allow your 
users to write to the webapps folder to easily deploy their webapps, and 
they (hopefully) won't be able to hack the container.

BTW, there's some stuff I didn't retest, in addition to the two known 
issues I mentioned (the WAR locking could be caused by fileupload, and 
is worth investigating IMO), including deploying XML descriptors from 
themanager.

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/coreStandardContext.java

2003-06-16 Thread Glenn Nielsen
[EMAIL PROTECTED] wrote:
remm2003/06/15 06:10:41

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Move context descriptors to
$CATALINA_BASE/conf//, as proposed by Glenn.
  - This should make the feature secure, and I think there's no justification
anymore for the deployXML flag.
  - Note: The manager webapp may need a few updates, which are in progress.
  
I haven't had a chance to review the code yet. I have a question about removing the
deployXML flag.  In your redesign will the ability to install a {context}.xml file
using an ant task or the web application manager still be available?  If so, then
for security the deployXML flag would still be needed.
Regards,

Glenn

-
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/coreStandardContext.java

2003-05-30 Thread Remy Maucherat
Jean-Francois Arcand wrote:
Bonne nouvelle :-)

The problem right now is we ends up with 2 configuration files. If I 
have under webapps/ a file named test.xml that contains:



that always work. But if the path is equals to:



that will not work (even with my tentative patch). We will ends up with 
2 configurations file (test.xml and test2.xml) and the admin 
tool/HostDeployer will always use webapp/test.xml
According to the consensus, the context files will go in 
conf/[enginename]/[hostname]/

I'll try to be careful during the refactoring (which will not be done by 
today, sorry), and I'll try to make the deployer less dumb ;-)

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/coreStandardContext.java

2003-05-30 Thread Jean-Francois Arcand


Remy Maucherat wrote:

[EMAIL PROTECTED] wrote:

jfarcand2003/05/28 21:13:24

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  Revert back my latest changes since it did not fix the problem 
completely.


Don't worry about that IMO. I'll have to rewrite that code for the 
deployer refactoring I'll do (today).
I hope I'll be done in one day :)
Bonne nouvelle :-)

The problem right now is we ends up with 2 configuration files. If I 
have under webapps/ a file named test.xml that contains:



that always work. But if the path is equals to:



that will not work (even with my tentative patch). We will ends up with 
2 configurations file (test.xml and test2.xml) and the admin 
tool/HostDeployer will always use webapp/test.xml

-- Jeanfrancois






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

2003-05-29 Thread Remy Maucherat
[EMAIL PROTECTED] wrote:
jfarcand2003/05/28 21:13:24

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  Revert back my latest changes since it did not fix the problem completely.
Don't worry about that IMO. I'll have to rewrite that code for the 
deployer refactoring I'll do (today).
I hope I'll be done in one day :)

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/coreStandardContext.java

2003-03-12 Thread Remy Maucherat
Costin Manolache wrote:
[EMAIL PROTECTED] wrote:


remm2003/03/12 13:32:50

 Modified:catalina/src/share/org/apache/catalina/core
   StandardContext.java
 Log:
 - If init needs guards against being invoked twice, this also needs it.
 - Any explanation why, BTW ?


The general idea is simple: components shouldn't assume a perfect world
where everything is consistent and loaded in a certain order.
In this particular case - I assume the mbean for the context couldn't
find the parent to register itself - when it adds itself to the host, the
host will call setParent(). On destroy - I don't think this is a problem.
Well, I was getting a NPE, and the logs seemed to indicate that destroy 
had already been called.

Remy

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