Yoav Shapira | 1 Feb 01:03
Picon
Favicon
Gravatar

Please remind me why context path for XML descriptors is coded to file name?

Hi,
I know we've talked about this before and resolved Bugzilla items
related to this, but I'd like to be reminded, please.  Why does the
following code exist as such?

In org.apache.catalina.startup.HostConfig
(http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?view=annotate),
deployDescriptors method (line 527), the following code:

File contextXml = new File(configBase, files[i]);
if (files[i].toLowerCase().endsWith(".xml")) {

  // Calculate the context path and make sure it is unique
  String nameTmp = files[i].substring(0, files[i].length() - 4);
  String contextPath = "/" + nameTmp.replace('#', '/');
  if (nameTmp.equals("ROOT")) {
    contextPath = "";
  }

  if (isServiced(contextPath))
    continue;
 ...

This code results in the (correctly documented at
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html, but
annoying) behavior that users deploying web applications from
conf/Catalina/localhost/appname.xml context files can't set a path for
their context.  Instead, the path is taken right from the file name,
which is less flexible.

(Continue reading)

bugzilla | 1 Feb 01:19
Picon
Favicon

DO NOT REPLY [Bug 41504] - Illegal access: this web application instance has been stopped already

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41504>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41504

------- Additional Comments From markt <at> apache.org  2007-01-31 16:19 -------
*** Bug 41507 has been marked as a duplicate of this bug. ***

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 1 Feb 01:19
Picon
Favicon

DO NOT REPLY [Bug 41507] - Illegal access: this web application instance has been stopped already

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41507>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41507

markt <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

------- Additional Comments From markt <at> apache.org  2007-01-31 16:19 -------

*** This bug has been marked as a duplicate of 41504 ***

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 1 Feb 01:19
Picon
Favicon

DO NOT REPLY [Bug 41506] - Illegal access: this web application instance has been stopped already

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41506>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41506

markt <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE

------- Additional Comments From markt <at> apache.org  2007-01-31 16:19 -------

*** This bug has been marked as a duplicate of 41504 ***

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 1 Feb 01:19
Picon
Favicon

DO NOT REPLY [Bug 41504] - Illegal access: this web application instance has been stopped already

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41504>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41504

------- Additional Comments From markt <at> apache.org  2007-01-31 16:19 -------
*** Bug 41506 has been marked as a duplicate of this bug. ***

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 1 Feb 01:36
Picon
Favicon

DO NOT REPLY [Bug 41504] - Illegal access: this web application instance has been stopped already

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41504>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41504

------- Additional Comments From markt <at> apache.org  2007-01-31 16:36 -------
Please provide the simplest web application (ideally as a war) that exhibits
this issue.

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
remm | 1 Feb 01:39
Picon
Favicon
Gravatar

svn commit: r502060 - /tomcat/tc6.0.x/tags/TOMCAT_6_0_9/

Author: remm
Date: Wed Jan 31 16:39:00 2007
New Revision: 502060

URL: http://svn.apache.org/viewvc?view=rev&rev=502060
Log:
- As discussed, 6.0.9 tag.

Added:
    tomcat/tc6.0.x/tags/TOMCAT_6_0_9/
      - copied from r502059, tomcat/tc6.0.x/trunk/
bugzilla | 1 Feb 01:45
Picon
Favicon

DO NOT REPLY [Bug 41337] - Display an error page if no cert is available on CLIENT-CERT login

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41337>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41337

markt <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX
            Version|5.0.20                      |5.5.20

------- Additional Comments From markt <at> apache.org  2007-01-31 16:45 -------
As Julius notes the desired behaviour is possible with the current configuration
options and a little coding. The lack of useful error message when the SSL
handshake fails is more a browser failing than a Tomcat one.

I am have changed this issue to an enhancement and am resolving as WONTFIX as I
do not believe the benefit of a nice error message outweighs the risk of
allowing users with invalid certificates to make a successful connection.

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
(Continue reading)

Re: Please remind me why context path for XML descriptors is coded to file name?

hmm, that's how I thought it worked, the filename would only be used if 
the "path" attribute was not present inside the XML file.

Filip

Yoav Shapira wrote:
> Hi,
> I know we've talked about this before and resolved Bugzilla items
> related to this, but I'd like to be reminded, please.  Why does the
> following code exist as such?
>
> In org.apache.catalina.startup.HostConfig
>
(http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/HostConfig.java?view=annotate), 
>
> deployDescriptors method (line 527), the following code:
>
> File contextXml = new File(configBase, files[i]);
> if (files[i].toLowerCase().endsWith(".xml")) {
>
>  // Calculate the context path and make sure it is unique
>  String nameTmp = files[i].substring(0, files[i].length() - 4);
>  String contextPath = "/" + nameTmp.replace('#', '/');
>  if (nameTmp.equals("ROOT")) {
>    contextPath = "";
>  }
>
>  if (isServiced(contextPath))
>    continue;
> ...
(Continue reading)

markt | 1 Feb 01:59
Picon
Favicon
Gravatar

svn commit: r502062 - /tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java

Author: markt
Date: Wed Jan 31 16:59:17 2007
New Revision: 502062

URL: http://svn.apache.org/viewvc?view=rev&rev=502062
Log:
Fix build. I believe I implemented the intended behaviour. Rainer - can you confirm?

Modified:
    tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java

Modified: tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java?view=diff&rev=502062&r1=502061&r2=502062
==============================================================================
--- tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java (original)
+++ tomcat/connectors/trunk/jk/jkstatus/src/share/org/apache/jk/status/JkStatusTask.java Wed
Jan 31 16:59:17 2007
@@ -640,8 +640,8 @@
             currentProject.setNewProperty(prefix + ".time_to_recover_max",
                     Integer.toString(member.getTime_to_recover_max()));
             currentProject.setNewProperty(prefix + ".time_to_recover",
-                    (Integer.toString(member.getTime_to_recover_min()) +
-                    Integer.toString(member.getTime_to_recover_max()) / 2);
+                    (Integer.toString((member.getTime_to_recover_min()
+                            + member.getTime_to_recover_max()) / 2)));
         }

     }

Gmane