DO NOT REPLY [Bug 39711] - WebappLoader checkInterval documentation

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=39711


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Additional Comments From [EMAIL PROTECTED]  2006-12-30 01:59 ---
(In reply to comment #3)
> Removed backgroundProcessorDelay from loader configuration reference.
> 
> Which Host Container link is broken?

Next to "backgroundProcesssorDelay" on the page at the URL mentioned in the bug
description there is a line "See the general documentation for this parameter at
Host Container.". The "Host Container" is a dead link.

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

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



DO NOT REPLY [Bug 41265] New: - JspServlet's checkInterval parameter cannot be set to 0 implicitly

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41265

   Summary: JspServlet's checkInterval parameter cannot be set to 0
implicitly
   Product: Tomcat 5
   Version: 5.5.20
  Platform: All
OS/Version: All
Status: NEW
  Severity: minor
  Priority: P3
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


conf\web.xml's JspServlet init parameters include 'checkInterval', whose value
is explained as follows:
  If development is false and checkInterval is greater than zero, background
compilations are enabled.

If I add the following parameters one would think the background compilations
would be disabled (the value is not greater than zero).


checkInterval
0


development
false


However, the value is changed to 300 and the following warning is outputted:
Dec 30, 2006 7:13:57 PM org.apache.jasper.EmbeddedServletOptions 
WARNING: Warning: Invalid value for the initParam checkInterval. Will use the
default value of "300" seconds

According to the comment in web.xml "0" was a valid value. Either the comment or
the validity check is wrong. Or my understanding of them.

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

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



DO NOT REPLY [Bug 41263] - servletRequest.getRemotePort() returns incorrect value when behind mod_jk

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41263


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|normal  |enhancement
 Status|NEW |ASSIGNED




--- Additional Comments From [EMAIL PROTECTED]  2006-12-30 06:04 ---
Unfortunately the remote port is not part of the information passed along via
the ajp13 protocol. On the page

http://tomcat.apache.org/connectors-doc/ajp/ajpv13a.html

you can find under the heading "Request Packet Structure":

AJP13_FORWARD_REQUEST :=
prefix_code  (byte) 0x02 = JK_AJP13_FORWARD_REQUEST
method   (byte)
protocol (string)
req_uri  (string)
remote_addr  (string)
remote_host  (string)
server_name  (string)
server_port  (integer)
is_ssl   (boolean)
num_headers  (integer)
request_headers *(req_header_name req_header_value)
attributes  *(attribut_name attribute_value)
request_terminator (byte) OxFF

So I'm marking this as an enhancement request.
It's unclear though, if and when we will resolve this.
Thanks for the report.

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

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



DO NOT REPLY [Bug 41267] New: - NPE in TagLibraryInfoImpl for a declared tag files not in jar files

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41267

   Summary: NPE in TagLibraryInfoImpl for a declared tag files not
in jar files
   Product: Tomcat 5
   Version: 5.5.20
  Platform: Other
OS/Version: other
Status: NEW
  Severity: minor
  Priority: P2
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


When a tld contains a tag-file definition with a path that starts with
"/META-INF/tags" TagLibraryInfoImpl immediately assumes the tld is contained in
a jar file (like it should, according to specifications), and causes a NPE if it
doesn't since the jar URL is null.

This is actually a minor problem since the tag doesn't have to be loaded anyway
(tag files with a path of "META-INF/tags" must be packaged in jar), but the NPE
thrown by TagLibraryInfoImpl is not very friendly (I just spent a couple of
hours before understanding where it came from).

The attached patch simply fix TagLibraryInfoImpl in order to avoid a NPE. If the
file is not available in TagFileJarUrls a better exception will already be
thrown when trying to use it. This patch is only needed for tomcat 5.5, tomcat
6.0 doesn't have this problem (no NPE, but the same exception you will get in
5.5 after this patch).

For reference, this is the stacktrace you get in a JSP page without this fix:

java.lang.NullPointerException
java.util.Hashtable.put(Hashtable.java:396)
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagFileInfo(TagLibraryInfoImpl.java:494)
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:250)
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
org.apache.jasper.compiler.JspDocumentParser.getTaglibInfo(JspDocumentParser.java:1259)
org.apache.jasper.compiler.JspDocumentParser.startPrefixMapping(JspDocumentParser.java:767)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startNamespaceMapping(AbstractSAXParser.java:2063)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:499)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)

com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779)

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

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



DO NOT REPLY [Bug 41267] - NPE in TagLibraryInfoImpl for a declared tag files not in jar files

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41267





--- Additional Comments From [EMAIL PROTECTED]  2006-12-30 06:07 ---
Created an attachment (id=19331)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19331&action=view)
simple patch for TC55


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

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



DO NOT REPLY [Bug 41263] - servletRequest.getRemotePort() returns incorrect value when behind mod_jk

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41263





--- Additional Comments From [EMAIL PROTECTED]  2006-12-30 06:12 ---
Implementation hint: if we want to stay compatible with ajp13 we could use
another request attribute (in the ajp13 sense, e.g. SC_A_REMOTE_PORT = 14).
Unknown attributes are ignored on the tomcat side.

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

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



DO NOT REPLY [Bug 41263] - servletRequest.getRemotePort() returns incorrect value when behind mod_jk

2006-12-30 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
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=41263





--- Additional Comments From [EMAIL PROTECTED]  2006-12-30 09:43 ---
Unfortunately ignoring unknown attributes does not really happen. It's only what
the code comments claim to happen.

Instead unknown bytes are simply dropped, but if we introduce a new attribute
with a new indicator byte, the indicator gets dropped, but one of the following
length or data bytes might coincidently by equal to another indicator byte and
then everything breaks.

I tested by adding a new attribute server_addr, and the length of the addr
string was 12=oc. The decoder dropped the new indicator byte 0e but then found
the length byte 0c and assumed this to be equal to the SECRET indicator byte...

No easy way of adding new attributes :(

remotePort and LocalAddr have been forgotten (they were added in Servlet Spec
2.4) (resp. were dropped to not break the AJP13 protocol). We can easily get
both from Apache and IIS, but we first have to find a way to transmit them via
AJP13.


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

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



svn commit: r491307 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

2006-12-30 Thread markt
Author: markt
Date: Sat Dec 30 12:47:39 2006
New Revision: 491307

URL: http://svn.apache.org/viewvc?view=rev&rev=491307
Log:
Updated thread safety patch. I have tested this with the TCK suite and this 
patch does not cause any failures. The Admin app also now works.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?view=diff&rev=491307&r1=491306&r2=491307
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
 Sat Dec 30 12:47:39 2006
@@ -100,6 +100,48 @@
 }
 }
 
+
+/**
+ * Used to pass state when the request dispatcher is used. Using instance
+ * variables causes threading issues and state is too complex to pass and
+ * return single ServletRequest or ServletResponse objects.
+ */
+private class State {
+State(ServletRequest request, ServletResponse response,
+boolean including) {
+this.outerRequest = request;
+this.outerResponse = response;
+this.including = including;
+}
+
+/**
+ * The outermost request that will be passed on to the invoked servlet.
+ */
+ServletRequest outerRequest = null;
+
+
+/**
+ * The outermost response that will be passed on to the invoked 
servlet.
+ */
+ServletResponse outerResponse = null;
+
+/**
+ * The request wrapper we have created and installed (if any).
+ */
+ServletRequest wrapRequest = null;
+
+
+/**
+ * The response wrapper we have created and installed (if any).
+ */
+ServletResponse wrapResponse = null;
+
+/**
+ * Are we performing an include() instead of a forward()?
+ */
+boolean including = false;
+}
+
 // --- Constructors
 
 
@@ -131,7 +173,6 @@
 this.context = (Context) wrapper.getParent();
 this.requestURI = requestURI;
 this.servletPath = servletPath;
-this.origServletPath = servletPath;
 this.pathInfo = pathInfo;
 this.queryString = queryString;
 this.name = name;
@@ -153,30 +194,12 @@
 private static Log log = LogFactory.getLog(ApplicationDispatcher.class);
 
 /**
- * The request specified by the dispatching application.
- */
-private ServletRequest appRequest = null;
-
-
-/**
- * The response specified by the dispatching application.
- */
-private ServletResponse appResponse = null;
-
-
-/**
  * The Context this RequestDispatcher is associated with.
  */
 private Context context = null;
 
 
 /**
- * Are we performing an include() instead of a forward()?
- */
-private boolean including = false;
-
-
-/**
  * Descriptive information about this implementation.
  */
 private static final String info =
@@ -190,18 +213,6 @@
 
 
 /**
- * The outermost request that will be passed on to the invoked servlet.
- */
-private ServletRequest outerRequest = null;
-
-
-/**
- * The outermost response that will be passed on to the invoked servlet.
- */
-private ServletResponse outerResponse = null;
-
-
-/**
  * The extra path information for this RequestDispatcher.
  */
 private String pathInfo = null;
@@ -218,12 +229,12 @@
  */
 private String requestURI = null;
 
+
 /**
  * The servlet path for this RequestDispatcher.
  */
 private String servletPath = null;
 
-private String origServletPath = null;
 
 /**
  * The StringManager for this package.
@@ -246,18 +257,6 @@
 private Wrapper wrapper = null;
 
 
-/**
- * The request wrapper we have created and installed (if any).
- */
-private ServletRequest wrapRequest = null;
-
-
-/**
- * The response wrapper we have created and installed (if any).
- */
-private ServletResponse wrapResponse = null;
-
-
 // - Properties
 
 
@@ -323,11 +322,11 @@
 }
 
 // Set up to handle the specified request and response
-setup(request, response, false);
+State state = new State(request, response, false);
 
 if (Globals.STRICT_SERVLET_COMPLIANCE) {
 // Check SRV.8.2 / SRV.14.2.5.1 compliance
-checkSameObjects();
+checkSameObjects(request, response);
 }
 
 //

svn commit: r491354 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

2006-12-30 Thread markt
Author: markt
Date: Sat Dec 30 16:32:47 2006
New Revision: 491354

URL: http://svn.apache.org/viewvc?view=rev&rev=491354
Log:
Port Filip's improvement to the fix for bug 34956 from TC6.

Modified:

tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java?view=diff&rev=491354&r1=491353&r2=491354
==
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
 Sat Dec 30 16:32:47 2006
@@ -972,6 +972,14 @@
 boolean same = false;
 ServletRequest dispatchedRequest = appRequest;
 
+//find the request that was passed into the service method
+while (originalRequest instanceof ServletRequestWrapper &&
+((ServletRequestWrapper) originalRequest).getRequest()!=null) {
+originalRequest =
+((ServletRequestWrapper) originalRequest).getRequest();
+}
+
+//compare with the dispatched request
 while (!same) {
 if (originalRequest.equals(dispatchedRequest)) {
 same = true;
@@ -991,6 +999,15 @@
 same = false;
 ServletResponse dispatchedResponse = appResponse;
 
+//find the response that was passed into the service method
+while (originalResponse instanceof ServletResponseWrapper &&
+((ServletResponseWrapper) originalResponse).getResponse() !=
+null) {
+originalResponse =
+((ServletResponseWrapper) originalResponse).getResponse();
+}
+
+//compare with the dispatched response
 while (!same) {
 if (originalResponse.equals(dispatchedResponse)) {
 same = true;



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



svn commit: r491365 - /tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml

2006-12-30 Thread markt
Author: markt
Date: Sat Dec 30 18:19:07 2006
New Revision: 491365

URL: http://svn.apache.org/viewvc?view=rev&rev=491365
Log:
Port doc update for 41182 from TC5

Modified:
tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml?view=diff&rev=491365&r1=491364&r2=491365
==
--- tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/jasper-howto.xml Sat Dec 30 18:19:07 2006
@@ -84,9 +84,11 @@
 true.
 
 
-classpath - What class path should I use while compiling
-generated servlets?  By default the classpath is created dynamically based on
-the current web application.
+classpath - Defines the class path to be used to compile
+the generated servlets. This parameter only has an effect if the ServletContext
+attribute org.apache.jasper.Constants.SERVLET_CLASSPATH is not set. This
+attribute is always set when Jasper is used within Tomcat. By default the
+classpath is created dynamically based on the current web application.
 
 compilerSourceVM - What JDK version are the source files 
compatible with? (Default JDK 1.4)
 



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