DO NOT REPLY [Bug 50726] Jasper can generate uncompilable source code if genStringAsCharArray is turned on

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50726

--- Comment #1 from Konstantin Kolinko  2011-02-08 
03:17:35 EST ---
The genStringAsCharArray option affects the
o.a.jasper.compiler.Generator.GenerateVisitor#visit(Node.TemplateText) method.

It generates char array fields in the JSP page class initialized as
field = "string".toCharArray();

The "string" constants have 64K limit on string length. It is not run-time
limitation, but a limitation of the Java Class File format, see [1]. Apparently
it is what is being hit here.

[1]
http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#88659

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50726] Jasper can generate uncompilable source code if genStringAsCharArray is turned on

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50726

--- Comment #2 from Róbert István  2011-02-08 03:55:04 
EST ---
(In reply to comment #1)
> The genStringAsCharArray option affects the
> o.a.jasper.compiler.Generator.GenerateVisitor#visit(Node.TemplateText) method.
> 
> It generates char array fields in the JSP page class initialized as
> field = "string".toCharArray();
> 
> The "string" constants have 64K limit on string length. It is not run-time
> limitation, but a limitation of the Java Class File format, see [1]. 
> Apparently
> it is what is being hit here.
> 
> [1]
> http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#88659

Thank you, it's clear for me now. Is it be possible to provide an official
workaround like this?
 field = (new String("longstring_part1") + 
new String("longstring_part2") +
...
new String("longstring_partn")).toCharArray();

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50700] Context parameters are being overridden with parameters from the web application deployment descriptor

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50700

--- Comment #3 from ch...@derham.me.uk 2011-02-08 04:12:56 EST ---
Sergey's explanation is good, but just in case any more detail is required in
how to reproduce it, here's the steps I take. Expand a tomcat distribution.
Edit the \webapps\root\WEB-INF\web.xml file to become

http://java.sun.com/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
   version="2.5">
  Welcome to Tomcat
  
 Welcome to Tomcat
  
  
initialDbPath
a
  


then edit \conf\context.xml to become





then add a new file \webapps\ROOT\test.jsp which contains

<%@ page contentType="text/html; charset=UTF-8" %>


initialDbPath is : ${initParam.initialDbPath}

   

The context.xml setting should override the web.xml setting, but this is not
happening

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50726] Jasper can generate uncompilable source code if genStringAsCharArray is turned on

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50726

--- Comment #3 from Konstantin Kolinko  2011-02-08 
04:15:35 EST ---
>  field = (new String("longstring_part1") + 
> new String("longstring_part2") +
> ...
> new String("longstring_partn")).toCharArray();

I think that wouldn't work. What will work is to generate several arrays and
call out.write() with each one in turn.

Note that the 64K limit is not the char count aka str.length(), but the count
of bytes in UTF-8 encoding.  So, either that count should be calculated (better
without String.toBytes() call) or the threshold should be like (64K / (max
count of bytes in char in UTF-8)).

I wonder also whether initializing the array as = {'s', 't', 'r', 'i', 'n',
'g'} performs worse or better than the existing code.

Anyway, a test case is needed.


BTW, using mappedFile=false will probably hit the same limit.
(That is when the "breakAtLF" variable is false in that
visit(Node.TemplateText) method).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39740] semi-colon ; isn't allowed as a query argument separator

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39740

Mark Thomas  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
  Component|Catalina|Catalina
Version|5.0.30  |7.0.8
 Resolution|WONTFIX |
Product|Tomcat 5|Tomcat 7

--- Comment #6 from Mark Thomas  2011-02-08 05:06:34 EST ---
I've done a little more digging. Using '&' is alao a W3C recommendation
(although it pre-dates ';'). I'll look to see if it is possible to support ';'
as a query string separator in Tomcat 7. The chances of it being included are
going to depend on how many changes are required to the parsing code to make it
work.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1067734 - /tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java

2011-02-08 Thread Konstantin Kolinko
2011/2/6 Mark Thomas :
> On 06/02/2011 20:45, Konstantin Kolinko wrote:
>>
>>> URL: http://svn.apache.org/viewvc?rev=1067734&view=rev
>>> Log:
>>> First attempt at a valve to limit session creation by web crawlers.
>>> Docs etc to follow once it is confirmed working.
>>>
>>> Added:
>>>
>>> tomcat/trunk/java/org/apache/catalina/valves/CrawlerSessionManagerValve.java
>>>(with props)
>
> Still trying to figure out why it doesn't work with Jira at the moment.
>

A pair of comments, if you will return to this code

Re: r1067759:

> String uaHeader = uaHeaders.nextElement();

If user-agent header is absent in the request it will fail.

I thought maybe refactor that user-agent header processing into a helper method,
protected boolean isBotRequest(Request request) { .. }

Re: r1067797
> request.addCookie(new Cookie("JSESSIONID",

Maybe  request.setRequestedSessionCookie(true); call was needed as well.


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068341 - /tomcat/tc6.0.x/trunk/STATUS.txt

2011-02-08 Thread kkolinko
Author: kkolinko
Date: Tue Feb  8 11:35:55 2011
New Revision: 1068341

URL: http://svn.apache.org/viewvc?rev=1068341&view=rev
Log:
proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1068341&r1=1068340&r2=1068341&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Feb  8 11:35:55 2011
@@ -88,3 +88,9 @@ PATCHES PROPOSED TO BACKPORT:
   The updated patch fixes a race condition.
   We can stall this item until we get some feedback about 7.0.5.
   -1:
+
+* Reduce severity of log messages in o.a.t.util.http.Parameters
+  (backport of revs 1067039, 1067139)
+  http://people.apache.org/~kkolinko/patches/2011-02-08_tc6_Parameters.patch
+  +1: kkolinko
+  -1:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Tomcat 5.5.33 Build

2011-02-08 Thread Jim Jagielski

On Feb 8, 2011, at 2:29 AM, Konstantin Kolinko wrote:

> 2011/2/7 Jim Jagielski :
>> The builds for Tomcat 5.5.33 are ready for testing and approval.
>> The candidates binaries are available here:
>> 
>> http://people.apache.org/~jim/tomcat-5.5/
>> 
>> According to the release process, the 5.5.33 build corresponding to the
>> tag TOMCAT_5_5_33 [1] is:
>> 
>> [ ] Broken
>> [ ] Alpha
>> [ ] Beta
>> [ ] Stable
> 
> Runs good, but as Rainer already noted,  build.properties.default both
> in the src bundles and in the svn tag says that it is 5.5.32
> 
> Thus whoever will try to build it from the sources will get wrong
> version number.
> 
> 
> I think it would be better to re-tag (or update the
> build.properties.default inside the tag) and to rebuild the packages.
> Is it possible?
> 

Don't see why we need to though... Isn't the whole idea of a default
file something that doesn't need to change? 

I'm fine w/ retagging and rolling though.

> I updated  build.properties.default in tc5.5.x/trunk in r1068276
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068361 - /tomcat/tc5.5.x/tags/TOMCAT_5_5_33/

2011-02-08 Thread jim
Author: jim
Date: Tue Feb  8 13:07:14 2011
New Revision: 1068361

URL: http://svn.apache.org/viewvc?rev=1068361&view=rev
Log:
For defaults pickup

Removed:
tomcat/tc5.5.x/tags/TOMCAT_5_5_33/


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068363 - /tomcat/tc5.5.x/tags/TOMCAT_5_5_33/

2011-02-08 Thread jim
Author: jim
Date: Tue Feb  8 13:07:31 2011
New Revision: 1068363

URL: http://svn.apache.org/viewvc?rev=1068363&view=rev
Log:
Tagging Tomcat version TOMCAT_5_5_33.

Added:
tomcat/tc5.5.x/tags/TOMCAT_5_5_33/
  - copied from r1068361, tomcat/tc5.5.x/trunk/


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Tomcat 5.5.33 Build

2011-02-08 Thread Jim Jagielski
Retagged, rerolled and reuploaded... ;)

On Feb 8, 2011, at 8:04 AM, Jim Jagielski wrote:

> 
> On Feb 8, 2011, at 2:29 AM, Konstantin Kolinko wrote:
> 
>> 2011/2/7 Jim Jagielski :
>>> The builds for Tomcat 5.5.33 are ready for testing and approval.
>>> The candidates binaries are available here:
>>> 
>>> http://people.apache.org/~jim/tomcat-5.5/
>>> 
>>> According to the release process, the 5.5.33 build corresponding to the
>>> tag TOMCAT_5_5_33 [1] is:
>>> 
>>> [ ] Broken
>>> [ ] Alpha
>>> [ ] Beta
>>> [ ] Stable
>> 
>> Runs good, but as Rainer already noted,  build.properties.default both
>> in the src bundles and in the svn tag says that it is 5.5.32
>> 
>> Thus whoever will try to build it from the sources will get wrong
>> version number.
>> 
>> 
>> I think it would be better to re-tag (or update the
>> build.properties.default inside the tag) and to rebuild the packages.
>> Is it possible?
>> 
> 
> Don't see why we need to though... Isn't the whole idea of a default
> file something that doesn't need to change? 
> 
> I'm fine w/ retagging and rolling though.
> 
>> I updated  build.properties.default in tc5.5.x/trunk in r1068276
>> 
>> Best regards,
>> Konstantin Kolinko
>> 
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: dev-h...@tomcat.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068415 - /tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java

2011-02-08 Thread markt
Author: markt
Date: Tue Feb  8 14:28:30 2011
New Revision: 1068415

URL: http://svn.apache.org/viewvc?rev=1068415&view=rev
Log:
Improve comments

Modified:
tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java

Modified: tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java?rev=1068415&r1=1068414&r2=1068415&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java Tue Feb  
8 14:28:30 2011
@@ -132,8 +132,8 @@ public abstract class LifecycleMBeanBase
  * Utility method to enable sub-classes to easily register additional
  * components that don't implement {@link MBeanRegistration} with
  * an MBean server.
- * Note: This method can only be used once {@link #initInternal()} has been
- * called. 
+ * Note: This method should only be used once {@link #initInternal()} has
+ * been called and before {@link #destroyInternal()} has been called. 
  * 
  * @param obj   The object the register
  * @param objectNameKeyProperties   The key properties component of the
@@ -171,7 +171,10 @@ public abstract class LifecycleMBeanBase
 /**
  * Utility method to enable sub-classes to easily unregister additional
  * components that don't implement {@link MBeanRegistration} with
- * an MBean server.
+ * an MBean server.
+ * Note: This method should only be used once {@link #initInternal()} has
+ * been called and before {@link #destroyInternal()} has been called. 
+ * 
  * @param onThe name of the component to unregister
  */
 protected final void unregister(ObjectName on) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068416 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/catalina/deploy/ java/org/apache/catalina/mbeans/ webapps/docs/

2011-02-08 Thread markt
Author: markt
Date: Tue Feb  8 14:30:17 2011
New Revision: 1068416

URL: http://svn.apache.org/viewvc?rev=1068416&view=rev
Log:
Make NamingResources implement MBeanLifecycle
Environments, Resources and ResourceLinks are once again available via JMX

Modified:
tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
tomcat/trunk/java/org/apache/catalina/deploy/LocalStrings.properties
tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java
tomcat/trunk/java/org/apache/catalina/mbeans/MBeanUtils.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties?rev=1068416&r1=1068415&r2=1068416&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/LocalStrings.properties Tue Feb  
8 14:30:17 2011
@@ -122,6 +122,8 @@ standardContext.loginConfig.loginWarning
 standardContext.loginConfig.required=LoginConfig cannot be null
 standardContext.manager=Configured a manager of class [{0}]
 standardContext.mappingError=MAPPING configuration error for relative URI {0}
+standardContext.namingResource.init.fail=Failed to init new naming resources
+standardContext.namingResource.destroy.fail=Failed to destroy old naming 
resources
 standardContext.noResourceJar=Resource JARs are not supported. The JAR found 
at [{0}] will not be used to provide static content for context with name [{1}]
 standardContext.notFound=The requested resource ({0}) is not available.
 standardContext.notReloadable=Reloading is disabled on this Context

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1068416&r1=1068415&r2=1068416&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Feb  8 
14:30:17 2011
@@ -448,7 +448,6 @@ public class StandardContext extends Con
  * The naming resources for this web application.
  */
 private NamingResources namingResources = null;
-private ObjectName onameNamingResources;
 
 /**
  * The message destinations for this web application.
@@ -1934,16 +1933,29 @@ public class StandardContext extends Con
 // Process the property setting change
 NamingResources oldNamingResources = this.namingResources;
 this.namingResources = namingResources;
-namingResources.setContainer(this);
+if (namingResources != null) {
+namingResources.setContainer(this);
+}
 support.firePropertyChange("namingResources",
oldNamingResources, this.namingResources);
 
 // If set from server.xml, getObjectKeyPropertiesNameOnly() will
 // trigger an NPE. Initial registration takes place on INIT. 
 if (getState() != LifecycleState.NEW) {
-unregister(onameNamingResources);
-onameNamingResources = register(namingResources,
-"type=NamingResources," + 
getObjectKeyPropertiesNameOnly());
+if (oldNamingResources != null) {
+try {
+oldNamingResources.destroy();
+} catch (LifecycleException e) {
+log.warn("standardContext.namingResource.destroy.fail", e);
+}
+}
+if (namingResources != null) {
+try {
+namingResources.init();
+} catch (LifecycleException e) {
+log.warn("standardContext.namingResource.init.fail", e);
+}
+}
 }
 }
 
@@ -5435,7 +5447,9 @@ public class StandardContext extends Con
  sequenceNumber.getAndIncrement());
 broadcaster.sendNotification(notification);
 
-unregister(onameNamingResources);
+if (namingResources != null) {
+namingResources.destroy();
+}
 
 synchronized (instanceListenersLock) {
 instanceListeners = new String[0];
@@ -6087,8 +6101,7 @@ public class StandardContext extends Con
 
 // Register the naming resources
 if (namingResources != null) {
-onameNamingResources = register(namingResources,
-"type=NamingResources," + getObjectNameKeyProperties());
+namingResources.init();
 }
 
 // Send j2ee.object.created notification 

Modified: tomca

svn commit: r1068420 - in /tomcat/trunk: java/org/apache/catalina/mbeans/ServerLifecycleListener.java webapps/docs/changelog.xml webapps/docs/config/listeners.xml

2011-02-08 Thread markt
Author: markt
Date: Tue Feb  8 14:32:38 2011
New Revision: 1068420

URL: http://svn.apache.org/viewvc?rev=1068420&view=rev
Log:
Remove ServerLifecycleListener

Removed:
tomcat/trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java
Modified:
tomcat/trunk/webapps/docs/changelog.xml
tomcat/trunk/webapps/docs/config/listeners.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1068420&r1=1068419&r2=1068420&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  8 14:32:38 2011
@@ -64,6 +64,10 @@
 Restore access to Environments, Resources and ResourceLinks via JMX
 which was lost in early 7.0.x re-factoring. (markt)
   
+  
+Remove ServerLifeListener. This was already removed from server.xml and
+with the Lifecycle re-factoring is no longer required. (markt)
+  
 
   
   

Modified: tomcat/trunk/webapps/docs/config/listeners.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/listeners.xml?rev=1068420&r1=1068419&r2=1068420&view=diff
==
--- tomcat/trunk/webapps/docs/config/listeners.xml (original)
+++ tomcat/trunk/webapps/docs/config/listeners.xml Tue Feb  8 14:32:38 2011
@@ -117,19 +117,6 @@
 No additional attributes are supported by the Jasper Listener
 .
 
-Server Lifecycle Listener
-(org.apache.catalina.mbeans.ServerLifecycleListener)
-
-The Server Lifecycle Listener initializes the
-MBeanServer for the MBeans that may be used to manage Tomcat via JMX.
-Without this listener, none of the Tomcat MBeans will be available.
-
-This listener must only be nested within Server
-elements.
-
-No additional attributes are supported by the Server Lifecycle
-Listener.
-
 Global Resources Lifecycle Listener
 (org.apache.catalina.mbeans.GlobalResourcesLifecycleListener)
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1068420 - in /tomcat/trunk: java/org/apache/catalina/mbeans/ServerLifecycleListener.java webapps/docs/changelog.xml webapps/docs/config/listeners.xml

2011-02-08 Thread Konstantin Kolinko
2011/2/8  :
> Author: markt
> Date: Tue Feb  8 14:32:38 2011
> New Revision: 1068420
>
> URL: http://svn.apache.org/viewvc?rev=1068420&view=rev
> Log:
> Remove ServerLifecycleListener
>
> Removed:
>    tomcat/trunk/java/org/apache/catalina/mbeans/ServerLifecycleListener.java
> Modified:
>    tomcat/trunk/webapps/docs/changelog.xml
>    tomcat/trunk/webapps/docs/config/listeners.xml
>

> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  8 14:32:38 2011
> @@ -64,6 +64,10 @@
>         Restore access to Environments, Resources and ResourceLinks via JMX
>         which was lost in early 7.0.x re-factoring. (markt)
>       
> +      
> +        Remove ServerLifeListener. This was already removed from server.xml 
> and

ServerLifecycleListener

> +        with the Lifecycle re-factoring is no longer required. (markt)
> +      
>     
>   

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1068415 - /tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java

2011-02-08 Thread Konstantin Kolinko
2011/2/8  :
> Author: markt
> Date: Tue Feb  8 14:28:30 2011
> New Revision: 1068415
>
> URL: http://svn.apache.org/viewvc?rev=1068415&view=rev
> Log:
> Improve comments
>
> Modified:
>    tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java
>

> +     * Note: This method should only be used once {@link #initInternal()} has
> +     * been called and before {@link #destroyInternal()} has been called.

> +     * Note: This method should only be used once {@link #initInternal()} has
> +     * been called and before {@link #destroyInternal()} has been called.

Is this call condition meant to be explicitly enforced?
(Or the method already fails if it is called before initInternal() /
after destroyInternal() ?

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Tomcat 5.5.33 Build

2011-02-08 Thread Konstantin Kolinko
2011/2/8 Jim Jagielski :
>> Don't see why we need to though... Isn't the whole idea of a default
>> file something that doesn't need to change?
>>
If it were something like "5.5.0-dev" by default I wouldn't mind, but
"5.5.32" causes confusion with existing previous version.

> Retagged, rerolled and reuploaded... ;)
>

Thank you.

> [ ] Broken
> [ ] Alpha
> [ ] Beta
> [x] Stable


Best regards,
Konstantin Kolinko

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50734] New: 400 Bad Request when there are no web applications deployed on Tomcat 6.0.32

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50734

   Summary: 400 Bad Request when there are no web applications
deployed on Tomcat 6.0.32
   Product: Tomcat 6
   Version: 6.0.32
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: violet...@apache.org


Hi,

I have the following use case:
I have no web applications deployed on Tomcat. 
Nevertheless when I request a web application: http://localhost:8080/testapp
Instead of the expected 404 Not Found I'm receiving 400 Bad Request.

This scenario is tested on 6.0.32 and 7.0.8, it is working as expected on
7.0.8.

While searching the code for both versions, I can see that in 7.0.8 you have
the following:

org.apache.catalina.connector.CoyoteAdapter.postParseRequest(Request, Request,
Response, Response)
...
// If there is no context at this point, it is likely no ROOT
context
// has been deployed
if (request.getContext() == null) {
res.setStatus(404);
res.setMessage("Not found");
// No context, so use host
request.getHost().logAccess(request, response, 0, true);
return false;
}
...

In the 6.0.32 version of the same class there is no such statement. When
entering org.apache.catalina.core.StandardEngineValve.invoke(Request, Response)
...
if (host == null) {
response.sendError
(HttpServletResponse.SC_BAD_REQUEST,
 sm.getString("standardEngine.noHost", 
  request.getServerName()));
return;
}

...

the host is null because the context is null. So 400 Bad Request is returned.

Could you please introduce the check from Tomcat 7.0.8 in Tomcat 6.0.x. I think
that 404 Not Found is more appropriate for this use case and not 400 Bad
Request. The 400 status code typically is returned in case the request cannot
be fulfilled due to bad syntax.

Thanks in advance
Best Regards
Violeta Georgieva

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50734] 400 Bad Request when there are no web applications deployed on Tomcat 6.0.32

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50734

violet...@apache.org changed:

   What|Removed |Added

 CC||violet...@apache.org

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068480 - /tomcat/trunk/webapps/docs/changelog.xml

2011-02-08 Thread markt
Author: markt
Date: Tue Feb  8 17:05:56 2011
New Revision: 1068480

URL: http://svn.apache.org/viewvc?rev=1068480&view=rev
Log:
Fix typo - thanks Konstantin

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1068480&r1=1068479&r2=1068480&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  8 17:05:56 2011
@@ -65,8 +65,8 @@
 which was lost in early 7.0.x re-factoring. (markt)
   
   
-Remove ServerLifeListener. This was already removed from server.xml and
-with the Lifecycle re-factoring is no longer required. (markt)
+Remove ServerLifecycleListener. This was already removed from 
server.xml
+and with the Lifecycle re-factoring is no longer required. (markt)
   
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1068415 - /tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java

2011-02-08 Thread Mark Thomas
On 08/02/2011 14:56, Konstantin Kolinko wrote:
> 2011/2/8  :
>> Author: markt
>> Date: Tue Feb  8 14:28:30 2011
>> New Revision: 1068415
>>
>> URL: http://svn.apache.org/viewvc?rev=1068415&view=rev
>> Log:
>> Improve comments
>>
>> Modified:
>>tomcat/trunk/java/org/apache/catalina/util/LifecycleMBeanBase.java
>>
> 
>> + * Note: This method should only be used once {@link #initInternal()} 
>> has
>> + * been called and before {@link #destroyInternal()} has been called.
> 
>> + * Note: This method should only be used once {@link #initInternal()} 
>> has
>> + * been called and before {@link #destroyInternal()} has been called.
> 
> Is this call condition meant to be explicitly enforced?

No. These were more notes for the developer. That is why I used the word
'should' in the comment.

> (Or the method already fails if it is called before initInternal() /
> after destroyInternal() ?

You'll get NPEs in some cases.

Mark



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Tomcat 5.5.33 Build

2011-02-08 Thread Tim Whittington
> The builds for Tomcat 5.5.33 are ready for testing and approval.
> The candidates binaries are available here:
>
> http://people.apache.org/~jim/tomcat-5.5/
>
> According to the release process, the 5.5.33 build corresponding to the
> tag TOMCAT_5_5_33 [1] is:
>
> [ ] Broken
> [ ] Alpha
> [ ] Beta
> [x ] Stable

tim

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068549 - in /tomcat/trunk/java/org/apache/catalina/tribes/group: ExtendedRpcCallback.java RpcChannel.java

2011-02-08 Thread fhanik
Author: fhanik
Date: Tue Feb  8 20:18:19 2011
New Revision: 1068549

URL: http://svn.apache.org/viewvc?rev=1068549&view=rev
Log:
https://issues.apache.org/bugzilla/show_bug.cgi?id=50667
Allow a replier to get confirmation if the reply message was sent successfully 
or if it failed 

Added:
tomcat/trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java
Modified:
tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java

Added: 
tomcat/trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java?rev=1068549&view=auto
==
--- tomcat/trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java 
(added)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/ExtendedRpcCallback.java 
Tue Feb  8 20:18:19 2011
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.catalina.tribes.group;
+
+import java.io.Serializable;
+
+import org.apache.catalina.tribes.ErrorHandler;
+import org.apache.catalina.tribes.Member;
+/**
+ * Extension to the {@link RpcCallback} interface. Allows a RPC messenger to 
get a confirmation if the reply
+ * was sent successfully to the original sender.
+ * @author fhanik
+ *
+ */
+public interface ExtendedRpcCallback extends RpcCallback {
+
+/**
+ * 
+ * @param request - the original message that requested the reply
+ * @param response - the reply message to the original message
+ * @param sender - the sender requested that reply
+ * @param reason - the reason the reply failed
+ * @return true if the callback would like to reattempt the reply, false 
otherwise
+ */
+public boolean replyFailed(Serializable request, Serializable response, 
Member sender, Exception reason);
+
+/**
+ * 
+ * @param request - the original message that requested the reply
+ * @param response - the reply message to the original message
+ * @param sender - the sender requested that reply
+ */
+public void replySucceeded(Serializable request, Serializable response, 
Member sender);
+}

Modified: tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1068549&r1=1068548&r2=1068549&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Tue Feb  
8 20:18:19 2011
@@ -24,7 +24,9 @@ import java.util.HashMap;
 import org.apache.catalina.tribes.Channel;
 import org.apache.catalina.tribes.ChannelException;
 import org.apache.catalina.tribes.ChannelListener;
+import org.apache.catalina.tribes.ErrorHandler;
 import org.apache.catalina.tribes.Member;
+import org.apache.catalina.tribes.UniqueId;
 import org.apache.catalina.tribes.util.UUIDGenerator;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -126,14 +128,46 @@ public class RpcChannel implements Chann
 }//synchronized
 }//end if
 } else{
+boolean finished = false;
+final ExtendedRpcCallback excallback = (callback instanceof 
ExtendedRpcCallback)?((ExtendedRpcCallback)callback) : null;
+boolean asyncReply = ((replyMessageOptions & 
Channel.SEND_OPTIONS_ASYNCHRONOUS) == Channel.SEND_OPTIONS_ASYNCHRONOUS);
 Serializable reply = callback.replyRequest(rmsg.message,sender);
-rmsg.reply = true;
-rmsg.message = reply;
-try {
-channel.send(new Member[] {sender}, rmsg,
-replyMessageOptions & 
~Channel.SEND_OPTIONS_SYNCHRONIZED_ACK);
-}catch ( Exception x )  {
-log.error("Unable to send back reply in RpcChannel.",x);
+while (!finished) {
+ErrorHandler handler = null;
+final Serializable request = msg;
+final Serializable respo

DO NOT REPLY [Bug 50667] Tribes | RpcChannel | Add a callback for cases when an error occured sending a reply to an RP call

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50667

Filip Hanik  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #11 from Filip Hanik  2011-02-08 15:29:22 EST ---
hi Olivier, thanks for your patch.
Having two callback objects seems a bit overkill. It's the route I went down
originally, but decided against it.
I've checked in a fix, sparked by looking at your code in r1068549
This should satisfy the requirements in terms getting the confirmation in both
async and non async mode.

Let me know if this does it!

best
Filip

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068560 - /tomcat/trunk/webapps/docs/changelog.xml

2011-02-08 Thread fhanik
Author: fhanik
Date: Tue Feb  8 20:34:16 2011
New Revision: 1068560

URL: http://svn.apache.org/viewvc?rev=1068560&view=rev
Log:
Update changelog with latest tribes fixes

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1068560&r1=1068559&r2=1068560&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  8 20:34:16 2011
@@ -82,6 +82,13 @@
   
 
   
+  
+
+  
+1068549 50667: Allow RPC callers to get 
confirmation when sending a reply.
+
+
+  
   
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39740] semi-colon ; isn't allowed as a query argument separator

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39740

--- Comment #7 from Christopher Schultz  
2011-02-08 15:42:11 EST ---
Not that it's necessarily a good example, but Apache httpd does not recognize
";" as a query parameter separator, either.

For instance, if you have a URL which contains a "jsessionid" parameter
inserted before the "?" (which is of course how Tomcat constructs re-written
URLs containing session ids), httpd is not capable of locating a file on the
disk that matches (unless there is a file with a very unlikely name on the
disk).

Geez... these REST guys are never satisfied :)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50734] 400 Bad Request when there are no web applications deployed on Tomcat 6.0.32

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50734

--- Comment #1 from Christopher Schultz  
2011-02-08 15:47:58 EST ---
For more context:

http://markmail.org/message/3tpkhfqrsblzyiwd

In that thread, Pid offhandedly mentions a suggestion from Tim (maybe?) that a
default ROOT context with no content be created if none is already deployed:
this would allow standard "not found" pages to be returned, etc.

Violeta, could you be specific about which patch for 7.0.8 you mean?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068658 - /tomcat/trunk/webapps/docs/changelog.xml

2011-02-08 Thread fhanik
Author: fhanik
Date: Tue Feb  8 22:49:35 2011
New Revision: 1068658

URL: http://svn.apache.org/viewvc?rev=1068658&view=rev
Log:
Start a new version, place fix in correct version

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1068658&r1=1068657&r2=1068658&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Feb  8 22:49:35 2011
@@ -41,6 +41,15 @@
 
+
+  
+
+  
+1068549 50667: Allow RPC callers to get 
confirmation when sending a reply.
+
+
+  
+
 
   
 
@@ -82,13 +91,6 @@
   
 
   
-  
-
-  
-1068549 50667: Allow RPC callers to get 
confirmation when sending a reply.
-
-
-  
   
 
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50737] New: Error on .war deploy - archive malformed (on recent Tomcat releases) on IBM iSeries System i

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50737

   Summary: Error on .war deploy - archive malformed (on recent
Tomcat releases) on IBM iSeries System i
   Product: Tomcat 6
   Version: 6.0.32
  Platform: Other
OS/Version: other
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: j...@jonericson.com


On Tomcat 6.0.20 a .war file can be deployed just fine on an IBM iSeries
(System i) at V6R1 of the OS.

After installing Tomcat 6.0.29 (and 6.0.30 and 6.0.32), .war files no longer
deploy.  See the stack trace at the bottom of this post.

On a Windows/7 machine this error does not occur with these Tomcat releases. 
On OS400 (i5/OS) this does not happen at 6.0.20.  This error only occurs on the
iSeries at Tomcat version 6.0.29+ (it may have started to occur between 6.0.20
and 6.0.29).  Note that it is the same .war file that is being deployed to each
of these environments.

   Tomcat 
  6.0.206.0.32
++-+
IBM iSeries |  OK|  ERROR  |
++-|
Windows/7   |  OK|   OK|
+--+

In troubleshooting, to make sure this is not an installation/configuration
error the Tomcat 6.0.20 zip file was downloaded from the Apache site and
re-installed on the iSeries.  The deploy works as before.  At 6.0.29, 6.0.30,
and 6.0.32, the deploy produces the following error:


Feb 8, 2011 2:52:07 PM org.apache.juli.logging.DirectJDKLog error
SEVERE: ContainerBase.addChild: start: 
LifecycleException:  Error initializaing :  java.lang.IllegalArgumentException:
The archive [jar:file:/apache/apache-tomcat-6.0.32/webapps/shopatron.war!/] is
malformed and will be ignored: an entry contains an illegal path [META-INF/]
at java.lang.Throwable.(Throwable.java:181)
at java.lang.Exception.(Exception.java:29)
at
org.apache.catalina.LifecycleException.(LifecycleException.java:80)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4450)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1397)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:575)
at
org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1500)
at
org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:252)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Feb 8, 2011 2:52:07 PM org.apache.juli.logging.DirectJDKLog error
SEVERE: Error deploying web application archive shop

Re: [VOTE] Release Tomcat 5.5.33 Build

2011-02-08 Thread Rainer Jung

On 07.02.2011 21:17, Jim Jagielski wrote:

The builds for Tomcat 5.5.33 are ready for testing and approval.
The candidates binaries are available here:

http://people.apache.org/~jim/tomcat-5.5/

According to the release process, the 5.5.33 build corresponding to the
tag TOMCAT_5_5_33 [1] is:

[ ] Broken
[ ] Alpha
[ ] Beta
[X] Stable
+++

1. http://svn.apache.org/viewvc/tomcat/tc5.5.x/tags/TOMCAT_5_5_33/


+1 for the new tarballs.

Rainer

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39740] semi-colon ; isn't allowed as a query argument separator

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39740

--- Comment #8 from William A. Rowe Jr.  2011-02-08 19:12:35 
EST ---
First, those comments are nonsense since 1999, as the URI is a quoted construct 
not subject to sgml parsing, and any sgml parser corruping quoted sgml tags
is broken, end of discussion.  Your post is similarly nonsense since ';'s are
allowed to be passed, the only question is what is made of them.

Second, http://tools.ietf.org/html/rfc3986 is the only relevant references
which 
http considers at the protocol layer. "HTML 4.01 Specification" was the origin
of the '&' construct - http://www.w3.org/TR/html401/.

It's reasonable by 3986 to put anything in a query arg as long as it is not a
literal '#' symbol.  The concept of query key=val pairs originates in CGI,
which
was formalized by W3C,
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
without deprecating the old '&' recommendation, so nobody adopts this change.
But it is entirely up to the application, so whichever decision the servlet
spec authors adopt is acceptable.  If they conform to what the user agents have
offered ('&' only) that's fine too.  What the W3C offered here is certainly not
worthy of being called a 'specification', as it was not specific.

To Christopher, you are getting your path and query segments confused.  In the
path part, /foo/bar is not /foo/bar;x=1 and that's made very clear in the spec.
And in your example /foo/bar;uid=1 is not /foo/bar;uid=2, something that is
very deliberate in presenting per-session data.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50738] New: Manager.initInternal not invoked on context reload

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50738

   Summary: Manager.initInternal not invoked on context reload
   Product: Tomcat 7
   Version: 7.0.8
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: dev@tomcat.apache.org
ReportedBy: martin.grot...@googlemail.com


When the webapp context is reloaded (due to a change of web.xml) then
stopInternal and startInternal are invoked, but not initInternal.

Steps to reproduce:
1) Start tomcat
2) touch web.xml

Expected: initInternal should be invoked on the manager.
Actual: not invoked.

Tested with tomcat 7.0.8

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39740] semi-colon ; isn't allowed as a query argument separator

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39740

--- Comment #9 from Konstantin Kolinko  2011-02-09 
00:58:22 EST ---
I think it does not make sense to parse those in the body, as mime-type
"application/x-www-form-urlencoded" as defined by HTML spec explicitly defines
'&' as separators.

Parsing the query string and adding parameter could be done in a Valve.

There is Request#addParameter(String, String[]) that allows to add parameters,
though it must be called before any call to Request#getParameterMap(), because
such call will populate Request#patameterMap, effectively caching it.

Finally, it can be done in a Filter, wrapping the original HttpServletRequest.

I think that this feature does not need to be enabled by default.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50737] Error on .war deploy - archive malformed (on recent Tomcat releases) on IBM iSeries System i

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50737

--- Comment #1 from Konstantin Kolinko  2011-02-09 
01:16:00 EST ---
That message is "expandWar.illegalPath" in
org.apache.catalina.startup.ExpandWar. 

There are two places where it is checked there. Basically, it is 
if (!expandedFile.getCanonicalPath().startsWith( ))
check.

You will have to test what getCanonicalPath() returns for those paths on that
server and why the test fails.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 50738] Manager.initInternal not invoked on context reload

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=50738

Konstantin Kolinko  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #1 from Konstantin Kolinko  2011-02-09 
01:26:00 EST ---
See the state diagram in org.apache.catalina.Lifecycle.

Passing though initInternal will mean that the current component has to be
destroyed first and a new one to be created. I guess that will need re-parsing
context.xml and creating a new instance of StandardContext. That is not what
happens here.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1068762 - /tomcat/trunk/webapps/docs/changelog.xml

2011-02-08 Thread kkolinko
Author: kkolinko
Date: Wed Feb  9 06:39:25 2011
New Revision: 1068762

URL: http://svn.apache.org/viewvc?rev=1068762&view=rev
Log:
Add release date. Move recent changes into the new version.

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1068762&r1=1068761&r2=1068762&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Feb  9 06:39:25 2011
@@ -42,6 +42,23 @@
   General, Catalina, Coyote, Jasper, Cluster, Web applications, Extras, Other
 -->
 
+  
+
+  
+Enhance the RemoteIpFilter and RemoteIpValve so that the modified 
remote
+address, remote host, protocol and server port may be used in an access
+log if desired. (markt)
+  
+  
+Restore access to Environments, Resources and ResourceLinks via JMX
+which was lost in early 7.0.x re-factoring. (markt)
+  
+  
+Remove ServerLifecycleListener. This was already removed from 
server.xml
+and with the Lifecycle re-factoring is no longer required. (markt)
+  
+
+  
   
 
   
@@ -50,7 +67,7 @@
 
   
 
-
+
   
 
   
@@ -64,19 +81,6 @@
 When running under a security manager, user requests may fail with a
 security exception. (markt)
   
-  
-Enhance the RemoteIpFilter and RemoteIpValve so that the modified 
remote
-address, remote host, protocol and server port may be used in an access
-log if desired. (markt)
-  
-  
-Restore access to Environments, Resources and ResourceLinks via JMX
-which was lost in early 7.0.x re-factoring. (markt)
-  
-  
-Remove ServerLifecycleListener. This was already removed from 
server.xml
-and with the Lifecycle re-factoring is no longer required. (markt)
-  
 
   
   



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 39740] semi-colon ; isn't allowed as a query argument separator

2011-02-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=39740

--- Comment #10 from William A. Rowe Jr.  2011-02-09 01:50:59 
EST ---
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4 specifically says
the URL-args of a get are similarly application/x-www-form-urlencoded ... it
does make sense to optionally apply a filter.  Let the administrator go to
the trouble if they desire this, until the W3C finally declares ';' as the
correct syntax, and not some obtuse footnote that contradicts their spec.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org