Re: jk connector error on post.

2005-01-19 Thread Ryan Bloom

I believe I have made some progress now.  It looks like this is a problem 
with mod_perl and mod_jk interacting poorly.  I haven't investigated why 
yet, but mod_perl is calling ap_should_client_block in the authentication 
phase of Apache, which plays havoc with mod_jk's call in the handler.  
Mod_jk is in the right here, and I'm 99.9% sure that mod_perl isn't making 
the call, but rather our code is.  So, this is my problem.  Thanks to 
everybody who helped.

Ryan

On Tue, 18 Jan 2005, William A. Rowe, Jr. wrote:

 Hi Ryan, fancy meeting up here :)  You don't mention, so
 I'll confirm - you are using mod_jk 1.2.8 (brand new release)?
 This sure sounds like the (rather obscure) issues with re-piping
 body content, and taking a simple guess, if you drop back and
 force http/1.0 (eliminate chunking) the issue goes away?
 
 Bill
 
 At 06:55 PM 1/17/2005, Ryan Bloom wrote:
 
 I am trying to get Apache 1.3 and Tomcat 5.0.27 working together.  My site 
 basically works, but any POST request causes the following error with a 
 hex dump:
 
 Jan 17, 2005 3:19:23 PM org.apache.jk.common.HandlerRequest invoke
 SEVERE: Error decoding request
 java.io.IOException
 at 
 org.apache.jk.common.JkInputStream.receive(JkInputStream.java:252)
 at 
 org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:500)
 at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
 at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
 at 
 org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:567)
 
 
 I have been unable to get Tomcat to give me more log messages.  The web 
 pages are very clear that jk2 is no longer in development, so I really 
 don't want to go to jk2.  but I am at a loss as to where to go from here.
 
 Can anybody suggest a possible solution?
 
 Thanks,
 
 Ryan
 
 -
 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: jk connector error on post.

2005-01-18 Thread Ryan Bloom

Actually, both 1.2.6 and 1.2.8 of mod_jk.  What do you mean re-piping body 
content?  I haven't forced http/1.0 yet, I was about to trace through 
Apache to find the problem.  My initial investigation looks like the 
problem is in Apache somewhere, looks like 
ap_setup_client_block/ap_should_client_block.

Ryan

On Tue, 18 Jan 2005, William A. Rowe, Jr. wrote:

 Hi Ryan, fancy meeting up here :)  You don't mention, so
 I'll confirm - you are using mod_jk 1.2.8 (brand new release)?
 This sure sounds like the (rather obscure) issues with re-piping
 body content, and taking a simple guess, if you drop back and
 force http/1.0 (eliminate chunking) the issue goes away?
 
 Bill
 
 At 06:55 PM 1/17/2005, Ryan Bloom wrote:
 
 I am trying to get Apache 1.3 and Tomcat 5.0.27 working together.  My site 
 basically works, but any POST request causes the following error with a 
 hex dump:
 
 Jan 17, 2005 3:19:23 PM org.apache.jk.common.HandlerRequest invoke
 SEVERE: Error decoding request
 java.io.IOException
 at 
 org.apache.jk.common.JkInputStream.receive(JkInputStream.java:252)
 at 
 org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:500)
 at 
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
 at 
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
 at 
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
 at 
 org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
 at 
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
 at java.lang.Thread.run(Thread.java:567)
 
 
 I have been unable to get Tomcat to give me more log messages.  The web 
 pages are very clear that jk2 is no longer in development, so I really 
 don't want to go to jk2.  but I am at a loss as to where to go from here.
 
 Can anybody suggest a possible solution?
 
 Thanks,
 
 Ryan
 
 -
 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]



jk connector error on post.

2005-01-17 Thread Ryan Bloom

I am trying to get Apache 1.3 and Tomcat 5.0.27 working together.  My site 
basically works, but any POST request causes the following error with a 
hex dump:

Jan 17, 2005 3:19:23 PM org.apache.jk.common.HandlerRequest invoke
SEVERE: Error decoding request
java.io.IOException
at 
org.apache.jk.common.JkInputStream.receive(JkInputStream.java:252)
at 
org.apache.jk.common.HandlerRequest.decodeRequest(HandlerRequest.java:500)
at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:352)
at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at 
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:567)


I have been unable to get Tomcat to give me more log messages.  The web 
pages are very clear that jk2 is no longer in development, so I really 
don't want to go to jk2.  but I am at a loss as to where to go from here.

Can anybody suggest a possible solution?

Thanks,

Ryan

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



Re: Tag files not pooling

2003-11-12 Thread Ryan Lubke
The JSP 2.0 specification states that these must not be cached.

See section 7.1.5.



On Wed, 2003-11-12 at 10:48, jakarta wrote:
 Is tomcat 5 going to suport tag file pooling as well as tag pooling.
 When looking at some generated code I notice that it was currently only
 pooling tags not tag files?
 
 Thanks,
 
 john
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Ryan Lubke [EMAIL PROTECTED]
Sun Microsystems, Inc.


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



Re: cvs commit:jakarta-servletapi-5/jsr154/src/share/javax/servlet/http HttpUtils.java

2002-12-13 Thread Ryan Lubke
Yes it should.  That's twice I've done that now.  

On Fri, 2002-12-13 at 12:56, Jason Hunter wrote:
 Shouldn't that be amp; instead?
 
 -jh-
 
 [EMAIL PROTECTED] wrote:
  
  jfarcand2002/12/13 08:47:29
  
Modified:jsr154/src/share/javax/servlet/http HttpUtils.java
Log:
Doclets bombs when processing this file (minor fix)
  
Submitted by: Ryan Lubke
  
Revision  ChangesPath
1.3   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpUtils.java
  
Index: HttpUtils.java
===
RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpUtils.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HttpUtils.java15 Oct 2002 21:39:44 -  1.2
+++ HttpUtils.java13 Dec 2002 16:47:28 -  1.3
@@ -104,7 +104,7 @@
  * The query string should be in the form of a string
  * packaged by the GET or POST method, that is, it
  * should have key-value pairs in the form ikey=value/i,
- * with each pair separated from the next by a  character.
+ * with each pair separated from the next by a apos character.
  *
  * pA key can appear more than once in the query string
  * with different values. However, the key appears only once in
  
  
  
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ryan Lubke [EMAIL PROTECTED]
Sun Microsystems, Inc.


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




Re: cvs commit:jakarta-servletapi-5/jsr154/src/share/javax/servlet/http HttpUtils.java

2002-12-13 Thread Ryan Lubke
You still missed the terminating ';' :)

On Fri, 2002-12-13 at 13:01, [EMAIL PROTECTED] wrote:
 jfarcand2002/12/13 10:01:54
 
   Modified:jsr154/src/share/javax/servlet/http HttpUtils.java
   Log:
   amp instead (thanks Jason).
   
   Revision  ChangesPath
   1.4   +1 -1  
jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpUtils.java
   
   Index: HttpUtils.java
   ===
   RCS file: 
/home/cvs/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpUtils.java,v
   retrieving revision 1.3
   retrieving revision 1.4
   diff -u -r1.3 -r1.4
   --- HttpUtils.java  13 Dec 2002 16:47:28 -  1.3
   +++ HttpUtils.java  13 Dec 2002 18:01:54 -  1.4
   @@ -104,7 +104,7 @@
 * The query string should be in the form of a string
 * packaged by the GET or POST method, that is, it
 * should have key-value pairs in the form ikey=value/i,
   - * with each pair separated from the next by a apos character.
   + * with each pair separated from the next by a amp character.
 *
 * pA key can appear more than once in the query string
 * with different values. However, the key appears only once in 
   
   
   
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
-- 
Ryan Lubke [EMAIL PROTECTED]
Sun Microsystems, Inc.


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




[PATCH][JASPER2] Simple patch for one of the resource errormessages.

2002-11-20 Thread Ryan Lubke
I think that the following error message is incorrect:

 - Scripting elements ( %@, %!, %=, % ) are disallowed here.

Since directives (%@) are not scripting elements.

I've attached a patch to correct the messages.properties.




Index: messages.properties
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v
retrieving revision 1.60
diff -u -r1.60 messages.properties
--- messages.properties	16 Nov 2002 04:20:10 -	1.60
+++ messages.properties	20 Nov 2002 23:47:23 -
@@ -266,7 +266,7 @@
 jsp.error.empty.body.not.allowed=Empty body not allowed for {0}
 jsp.error.jspbody.required=Must use jsp:body to specify tag body for {0} if jsp:attribute is used.
 jsp.error.jspbody.emptybody.only=The {0} tag can only have jsp:attribute in its body.
-jsp.error.no.scriptlets=Scripting elements ( %@, %!, %=, % ) are disallowed here.
+jsp.error.no.scriptlets=Scripting elements ( %!, %=, % ) are disallowed here.
 jsp.error.internal.unexpected_node_type=Internal Error: Unexpected node type encountered
 jsp.error.tld.fn.invalid.signature=Invalid syntax for function signature in TLD.  Tag Library: {0}, Function: {1}
 jsp.error.tld.fn.duplicate.name=Duplicate function name {0} in tag library {1}


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


Re: Bug(?) and suggested solution for chunked transfer-encoding POSTrequest

2002-11-08 Thread Ryan Hoegg
Remy Maucherat wrote:


Adrian Sampaleanu wrote:


We are having a problem with Catalina 4.1.12 (I believe we also had 
issues with previous versions, but can't say for sure) with respect 
to how POSTed requests are handled if the transfer encoding is 
chunked. It seems that request parameters in the content are not 
processed in this case.


This is not legal. In HTTP/1.1, FORM encoded data of a POST must have 
a content-length. You can do the parsing yourself, of course.

Rémy 

See RFC2616, Section 4.4.  An excerpt:

Messages MUST NOT include both a Content-Length header field and a
  non-identity transfer-coding. If the message does include a non-
  identity transfer-coding, the Content-Length MUST be ignored.

In looking through RFC2616, I didn't see any special case for POST 
requests with FORM encoding that either required the use of 
Content-Length (thereby prohibiting the use of Transfer-Encoding: 
chunked) or vice versa.  If I missed it or if its in a different RFC 
please post a reference.

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



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

2002-11-06 Thread Ryan Lubke
 of these.
}
   -
   +
return this.expressionEvaluator;
}

public void handlePageException(Exception ex)
   -throws IOException, ServletException 
   +throws IOException, ServletException
{
   // Should never be called since handleException() called with a
   // Throwable in the generated servlet.
   @@ -553,7 +554,7 @@
}

public void handlePageException(Throwable t)
   -throws IOException, ServletException 
   +throws IOException, ServletException
{
   if (t == null) throw new NullPointerException(null Throwable);

   @@ -563,9 +564,11 @@
   // Do not set the javax.servlet.error.exception attribute here
   // (instead, set in the generated servlet code for the error page)
   // in order to prevent the ErrorReportValve, which is invoked as
   -   // part of forwarding the request to the error page, from 
   +   // part of forwarding the request to the error page, from
   // throwing it if the response has not been committed (the response
   // will have been committed if the error page is a JSP page).
   +Object 
origException=request.getAttribute(javax.servlet.error.exception);
   +
   request.setAttribute(javax.servlet.jsp.jspException, t);
   request.setAttribute(javax.servlet.error.status_code,
   new Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
   @@ -578,6 +581,19 @@
} catch (IllegalStateException ise) {
include(errorPageURL);
}
   +// The error page could be inside an include.
   +
   +Object 
newException=request.getAttribute(javax.servlet.error.exception);
   +
   +if( (newException!= null)  (newException==origException) ) {
   +request.removeAttribute(javax.servlet.error.exception);
   +}
   +
   +// now clear the error code - to prevent double handling.
   +request.removeAttribute(javax.servlet.error.status_code);
   +request.removeAttribute(javax.servlet.error.request_uri);
   +request.removeAttribute(javax.servlet.error.status_code);
   +request.removeAttribute(javax.servlet.jsp.jspException);

   } else {
// Otherwise throw the exception wrapped inside a ServletException.
   @@ -601,19 +617,19 @@
/**
 * VariableResolver interface
 */
   -public Object resolveVariable( String pName, Object pContext ) 
   +public Object resolveVariable( String pName, Object pContext )
throws ELException
{
// Note: pContext will be going away.
try {
   -return PageContextImpl.variableResolver.resolveVariable( 
   +return PageContextImpl.variableResolver.resolveVariable(
pName, this );
}
catch( org.apache.jasper.runtime.el.jstl.ELException e ) {
throw new ELException( e );
}
}
   -
   +
/**
 * Proprietary method to evaluate EL expressions.
 * XXX - This method should go away once the EL interpreter moves
   @@ -627,16 +643,16 @@
 * @param defaultPrefix Default prefix for this evaluation
 * @return The result of the evaluation
 */
   -public static Object proprietaryEvaluate( String expression, 
   +public static Object proprietaryEvaluate( String expression,
Class expectedType, PageContext pageContext,
   ProtectedFunctionMapper functionMap, String defaultPrefix )
throws ELException
{
   java.util.HashMap funcMap =
   (functionMap == null)? null: functionMap.getFnMap();
   -   
   +
try {
   -return PageContextImpl.proprietaryEvaluator.evaluate( unknown, 
   +return PageContextImpl.proprietaryEvaluator.evaluate( unknown,
expression, expectedType, null, pageContext,
   funcMap, defaultPrefix );
}
   @@ -654,7 +670,7 @@
return null;
}
}
   -
   +
/*
 * fields
 */
   
   
   
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
-- 
Ryan Lubke [EMAIL PROTECTED]
Sun Microsystems, Inc.


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




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

2002-11-06 Thread Ryan Lubke
 
   +// no need to synchronize - not a big deal even if we create
// two of these.
}
   -
   +
return this.expressionEvaluator;
}

public void handlePageException(Exception ex)
   -throws IOException, ServletException 
   +throws IOException, ServletException
{
   // Should never be called since handleException() called with a
   // Throwable in the generated servlet.
   @@ -553,7 +554,7 @@
}

public void handlePageException(Throwable t)
   -throws IOException, ServletException 
   +throws IOException, ServletException
{
   if (t == null) throw new NullPointerException(null Throwable);

   @@ -563,9 +564,11 @@
   // Do not set the javax.servlet.error.exception attribute here
   // (instead, set in the generated servlet code for the error page)
   // in order to prevent the ErrorReportValve, which is invoked as
   -   // part of forwarding the request to the error page, from 
   +   // part of forwarding the request to the error page, from
   // throwing it if the response has not been committed (the response
   // will have been committed if the error page is a JSP page).
   +Object 
origException=request.getAttribute(javax.servlet.error.exception);
   +
   request.setAttribute(javax.servlet.jsp.jspException, t);
   request.setAttribute(javax.servlet.error.status_code,
   new Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
   @@ -578,6 +581,19 @@
} catch (IllegalStateException ise) {
include(errorPageURL);
}
   +// The error page could be inside an include.
   +
   +Object 
newException=request.getAttribute(javax.servlet.error.exception);
   +
   +if( (newException!= null)  (newException==origException) ) {
   +request.removeAttribute(javax.servlet.error.exception);
   +}
   +
   +// now clear the error code - to prevent double handling.
   +request.removeAttribute(javax.servlet.error.status_code);
   +request.removeAttribute(javax.servlet.error.request_uri);
   +request.removeAttribute(javax.servlet.error.status_code);
   +request.removeAttribute(javax.servlet.jsp.jspException);

   } else {
// Otherwise throw the exception wrapped inside a ServletException.
   @@ -601,19 +617,19 @@
/**
 * VariableResolver interface
 */
   -public Object resolveVariable( String pName, Object pContext ) 
   +public Object resolveVariable( String pName, Object pContext )
throws ELException
{
// Note: pContext will be going away.
try {
   -return PageContextImpl.variableResolver.resolveVariable( 
   +return PageContextImpl.variableResolver.resolveVariable(
pName, this );
}
catch( org.apache.jasper.runtime.el.jstl.ELException e ) {
throw new ELException( e );
}
}
   -
   +
/**
 * Proprietary method to evaluate EL expressions.
 * XXX - This method should go away once the EL interpreter moves
   @@ -627,16 +643,16 @@
 * @param defaultPrefix Default prefix for this evaluation
 * @return The result of the evaluation
 */
   -public static Object proprietaryEvaluate( String expression, 
   +public static Object proprietaryEvaluate( String expression,
Class expectedType, PageContext pageContext,
   ProtectedFunctionMapper functionMap, String defaultPrefix )
throws ELException
{
   java.util.HashMap funcMap =
   (functionMap == null)? null: functionMap.getFnMap();
   -   
   +
try {
   -return PageContextImpl.proprietaryEvaluator.evaluate( unknown, 
   +return PageContextImpl.proprietaryEvaluator.evaluate( unknown,
expression, expectedType, null, pageContext,
   funcMap, defaultPrefix );
}
   @@ -654,7 +670,7 @@
return null;
}
}
   -
   +
/*
 * fields
 */
   
   
   
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
 For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org
-- 
Ryan Lubke [EMAIL PROTECTED]
Sun Microsystems, Inc.


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Re: Possible bug in RequestDispatcher?

2002-11-05 Thread Ryan Hoegg
I looked into this a little further.  I think the resource the URL 
points to has a Content-Length of 234 bytes.  The Filter uses 
RequestDispatcher.forward() to return a document that is longer, and 
that document is getting truncated at about 234 bytes.

Could TC be setting the Content-Length header based on the originally 
requested document but returning the data from the forwarded one?

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

Ryan Hoegg wrote:

OK, that clarifies things a little bit.  If the problem isn't with 
RequestDispatcher, I am even more puzzled.  I have narrowed the 
problem down to a particular use case:

I have a single filter that calls 
getFilterContext().getServletContext().getRequestDispatcher(/WEB-INF/templates/form.html).forward(request, 
response) in the absence of a particular session variable on the request.

This filter is mapped to /* and I have a single servlet mapped to 
/Display

Pointing my browser at /webapp/Display : things work as expected.
Pointing my browser at /webapp/ : things work as expected
Pointing my browser at /webapp/staticfile.html : problem.

View Source in my browser shows this:
-
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html
 head
   title/title
 /head
 body
   form action=j_security_check method=POST
 pU
--

That is the beginning of the html file I am trying to forward() to.

It seems like my HttpServletResponse's OutputStream is getting closed 
prematurely in the exact same place in my forwarded file.

So what could it be?!

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

Craig R. McClanahan wrote:

In Servlet 2.3 (i.e. Tomcat 4.x), filters are *not* invoked on request
dispatcher calls -- only on the original request.  In Servlet 2.4 (i.e.
Tomcat 5.x) you can optionally configure which filters should be used on
forwards, includes, or both, with suitable settings in web.xml.

Craig





--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Possible bug in RequestDispatcher?

2002-11-04 Thread Ryan Hoegg
Hi,

Before I post a bug report, I wanted to run a peculiar situation by the 
experts.

I am creating some filters that verify that certain variables are in the 
session before allowing access to any page in my site.  There are 
currently two of them, and each forward the request to a form if a 
particular session variable is not set and if this is not the form 
submission.  They are using ((HttpServletRequest) 
request).getRequestDispatcher(/path/to/form1.html).forward(request, 
response) to accomplish this.

Something is broken, and if it's in my code I am missing it.  I have 
these filters mapped to /* and here is the peculiar behavior:
1. If I point my browser at /, I get the desired HTML page.
2. If I point at a servlet I have mapped, I get what looks like an HTML 
template page.
3. If I point at a static HTML file I have in the / I get a good chunk 
of the beginning of the HTML page and that's it.

My web.xml is simpler than simple, I described it above except for the 
single servlet mapping. (/Display)

I appreciate any insights you can provide!
--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



Re: Possible bug in RequestDispatcher?

2002-11-04 Thread Ryan Hoegg
OK, that clarifies things a little bit.  If the problem isn't with 
RequestDispatcher, I am even more puzzled.  I have narrowed the problem 
down to a particular use case:

I have a single filter that calls 
getFilterContext().getServletContext().getRequestDispatcher(/WEB-INF/templates/form.html).forward(request, 
response) in the absence of a particular session variable on the request.

This filter is mapped to /* and I have a single servlet mapped to /Display

Pointing my browser at /webapp/Display : things work as expected.
Pointing my browser at /webapp/ : things work as expected
Pointing my browser at /webapp/staticfile.html : problem.

View Source in my browser shows this:
-
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

html
 head
   title/title
 /head
 body
   form action=j_security_check method=POST
 pU
--

That is the beginning of the html file I am trying to forward() to.

It seems like my HttpServletResponse's OutputStream is getting closed 
prematurely in the exact same place in my forwarded file.

So what could it be?!

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

Craig R. McClanahan wrote:

In Servlet 2.3 (i.e. Tomcat 4.x), filters are *not* invoked on request
dispatcher calls -- only on the original request.  In Servlet 2.4 (i.e.
Tomcat 5.x) you can optionally configure which filters should be used on
forwards, includes, or both, with suitable settings in web.xml.

Craig




--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Tomcat scalability

2002-11-03 Thread ryan
1. For a project my company is working on we have transactions 
requirements of 1600 transactions per second.  The transactions consists 
of processing a servlet in Tomcat, doing a database call and then 
displaying the results to the user so the effective number of transactions
Tomcat has to process is actually greater than 1600.

Can Tomcat cope with 1600 requests in a second(a 4 processor Sunfire 
machine will be used)?  

Based upon our current application architecture(our java application has 
tomcat running inside it), 1600 request per second means we may have 
1600 threads open simultaneously.  

2. From one article I read at linux journal, Tomcat 3 didn't scale very 
well with multiple processors because of JVM issues.






--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



Re: Tomcat scalability

2002-11-03 Thread Ryan Hoegg
One good rule of thumb is not to solve problems that don't exist.  Your 
first task is to set up a server and hit it with something a good 
20%-50% more demanding than your expected load.  There exist several 
automated tools to do this.  One is JMeter at 
http://jakarta.apache.org/jmeter/index.html .

Then, have a look at your actual performance and work on the bottlenecks 
that arise.  If your application is spending most of its time waiting 
for database results, cache them.  If your application is spending most 
of its time creating and destroying objects, consider pooling.  If your 
app is choking on serving up 1600 images a second, use a web server such 
as Apache in front of Tomcat.  That will help with static requests 
(images, static HTML) even with a single Tomcat server doing the servlet 
work.

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net

[EMAIL PROTECTED] wrote:

That's a tough question to answer, and pretty much the only way you're
going to be able to tell is to try it.  Here's a few
suggestions of things to think about:

The first question you might want to ask is can your database handle 1600
transactions per second?  If not (and even if
it can) you may want to consider whether some kind of caching could help
you if the data is largely static.  This could
be caching of the data itself, or something as simple as caching the pages
themselves, with some scheme to flush
the cache if the data changes.  If your data is not very static, then this
wouldn't be as helpful of course.

If it's possible on the OS you are using, I'd be tempted to run 4 copies of
Tomcat, and dedicate a processor to each
one.  It's a lot harder to write code that will run reliably on a MP
machine than on a SP one, and it seems that Tomcat has
a few issues in that regard.

Also, remember, it's unlikely you'll ever have that many threads open at
once - if you are actually handling 1600 requests/second
then each request is, on average, taking less than a millisecond to
complete, so you won't have too many overlapping
requests.  If you can work out how long it takes to process one request,
then you'll have a best-case scenario of how
many you can handle.  In practice, it will be less of course, due to
overhead in handling multiple requests at once.

-- Rob


1. For a project my company is working on we have transactions
requirements of 1600 transactions per second.  The transactions consists
of processing a servlet in Tomcat, doing a database call and then
displaying the results to the user so the effective number of transactions
Tomcat has to process is actually greater than 1600.

Can Tomcat cope with 1600 requests in a second(a 4 processor Sunfire
machine will be used)?

Based upon our current application architecture(our java application has
tomcat running inside it), 1600 request per second means we may have
1600 threads open simultaneously.

2. From one article I read at linux journal, Tomcat 3 didn't scale very
well with multiple processors because of JVM issues.
 



--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org




Catalina Ant tasks

2002-11-02 Thread Ryan Hoegg
Hi,

Am I missing something or do we not have Ant tasks for the functionality 
available through the /admin application?  I have an itch, so if not I 
will be willing to contribute some code.

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



Re: Form Based Authentication, getting login and password

2002-10-31 Thread Ryan Hoegg
Hi, I am new to the list, so nice to meet you.

I found this thread in the archives while researching a way to do 
something similar.

I want to implement an authenticator that uses information in the 
session to augment the authentication.  I have looked into creating a 
subclass of FormAuthenticator and it seems fairly straightforward.  My 
plan is to override the authenticate() method and:

1. Check if the session is properly initialized (not sure how yet), and 
if not do something similar to the login form submission piece to 
collect prerequisite session info.
2. Build the username from the one submitted on the login form and from 
arbitrary session variables.
3. Hand off the rest of the authentication to FormAuthenticator for 
Realm based authentication.

This strategy would also allow me to build in 3 strikes and you're out 
functionality as I am inspecting the session before sending the 
authentication request to the realm.

Questions:
1. Is the entire idea wrongheaded for some reason that I am missing?
2. Any gotchas someone would like to point out for me?
3. authenticate() is an awfully long method.  Would anyone object to 
breaking it down into several protected method calls so that I can just 
override those and leave the rest up to FormAuthenticator?  Currently I 
have to copy a lot of code into my subclass.  I will be happy to submit 
my changes upstream.  I have worked a little with the Jakarta community 
and know the routine... you guys haven't switched to Scarab yet have you?

--
Ryan Hoegg
ISIS Networks
http://www.isisnetworks.net


--
To unsubscribe, e-mail:   mailto:tomcat-dev-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-dev-help;jakarta.apache.org



[PATCH][jakarta-servletapi-5/jsr152] Documentation Patch

2002-10-10 Thread Ryan Lubke

Update to clarify return values of TagVariableInfo.

 - getClassName() will return java.lang.String if
   the variable-class element is not specified.

 - getDeclare() will return true if the declare
   element is not specified.

 - getScope() will return NESTED as the scope if
   scope is not specified.






Index: TagVariableInfo.java
===
RCS file: /home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagVariableInfo.java,v
retrieving revision 1.2
diff -u -r1.2 TagVariableInfo.java
--- TagVariableInfo.java	19 Aug 2002 16:29:51 -	1.2
+++ TagVariableInfo.java	10 Oct 2002 01:02:08 -
@@ -139,7 +139,8 @@
 /**
  * The body of the lt;variable-classgt; element.  
  *
- * @return The name of the class of the variable
+ * @return The name of the class of the variable or
+ * 'java.lang.String' if not defined in the TLD.
  */
 
 public String getClassName() {
@@ -149,7 +150,8 @@
 /**
  * The body of the lt;declaregt; element
  *
- * @return Whether the variable is to be declared or not
+ * @return Whether the variable is to be declared or not.
+ * If not defined in the TLD, 'true' will be returned.
  */
 
 public boolean getDeclare() {
@@ -159,7 +161,9 @@
 /**
  * The body of the lt;scopegt; element
  *
- * @return The scope to give the variable.
+ * @return The scope to give the variable.  NESTED
+ * scope will be returned if not defined in 
+ * the TLD.
  */
 
 public int getScope() {



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


[PATCH][jakarta-servletapi-5/jsr152] Resubmit of documentation path.

2002-10-10 Thread Ryan Lubke

Please use the attached patch instead of the one I previously posted.

Changes

TagVariableInfo
  - getClassName() will return java.lang.String if
the variable-class element is not specified.

  - getDeclare() will return true if the declare
element is not specified.

  - getScope() will return NESTED as the scope if
scope is not specified.

TagLibraryInfo

  - Changed the directive from include to taglib in
description of getShortName().

  - Minor rewording of getReliableURN for clarity.



Thanks,

-rl



Index: TagLibraryInfo.java
===
RCS file: /home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagLibraryInfo.java,v
retrieving revision 1.3
diff -u -r1.3 TagLibraryInfo.java
--- TagLibraryInfo.java	20 Aug 2002 21:08:24 -	1.3
+++ TagLibraryInfo.java	10 Oct 2002 23:38:29 -
@@ -148,7 +148,7 @@
 /**
  * The preferred short name (prefix) as indicated in the TLD.
  * This may be used by authoring tools as the preferred prefix
- * to use when creating an include directive for this library.
+ * to use when creating an taglib directive for this library.
  *
  * @return the preferred short name for the library
  */
@@ -157,10 +157,9 @@
 }
 
 /**
- * The reliable URN indicated in the TLD.
+ * The reliable URN indicated in the TLD (the uri element).
  * This may be used by authoring tools as a global identifier
- * (the uri attribute) to use when creating a taglib directive
- * for this library.
+ * to use when creating a taglib directive for this library.
  *
  * @return a reliable URN to a TLD like this
  */
Index: TagVariableInfo.java
===
RCS file: /home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagVariableInfo.java,v
retrieving revision 1.2
diff -u -r1.2 TagVariableInfo.java
--- TagVariableInfo.java	19 Aug 2002 16:29:51 -	1.2
+++ TagVariableInfo.java	10 Oct 2002 23:38:30 -
@@ -139,7 +139,8 @@
 /**
  * The body of the lt;variable-classgt; element.  
  *
- * @return The name of the class of the variable
+ * @return The name of the class of the variable or
+ * 'java.lang.String' if not defined in the TLD.
  */
 
 public String getClassName() {
@@ -149,7 +150,8 @@
 /**
  * The body of the lt;declaregt; element
  *
- * @return Whether the variable is to be declared or not
+ * @return Whether the variable is to be declared or not.
+ * If not defined in the TLD, 'true' will be returned.
  */
 
 public boolean getDeclare() {
@@ -159,7 +161,9 @@
 /**
  * The body of the lt;scopegt; element
  *
- * @return The scope to give the variable.
+ * @return The scope to give the variable.  NESTED
+ * scope will be returned if not defined in 
+ * the TLD.
  */
 
 public int getScope() {



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


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

2002-09-30 Thread Ryan Lubke

Jan,

Think it would make more sense if the message was soemthing like
Name or attribute value was null?



On Mon, 2002-09-30 at 19:58, [EMAIL PROTECTED] wrote:
 luehe   2002/09/30 16:58:58
 
   Modified:jasper2/src/share/org/apache/jasper/runtime
 PageContextImpl.java
   Log:
   Fixed 13140: Compliance issue - PageContext.setAttribute, under
   certain circumstances, fails to throw an NPE when the value provided
   is null
   
   Revision  ChangesPath
   1.23  +16 -3 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
   
   Index: PageContextImpl.java
   ===
   RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
   retrieving revision 1.22
   retrieving revision 1.23
   diff -u -r1.22 -r1.23
   --- PageContextImpl.java30 Sep 2002 23:45:03 -  1.22
   +++ PageContextImpl.java30 Sep 2002 23:58:58 -  1.23
   @@ -232,11 +232,16 @@
}

public Object getAttribute(String name) {
   +
   +   if (name == null) throw new NullPointerException(Null name);
   return attributes.get(name);
}


public Object getAttribute(String name, int scope) {
   +
   +   if (name == null) throw new NullPointerException(Null name);
   +
   switch (scope) {
   case PAGE_SCOPE:
   return attributes.get(name);
   @@ -261,11 +266,19 @@


public void setAttribute(String name, Object attribute) {
   +
   +   if (name == null || attribute == null)
   +   throw new NullPointerException(Null name or attribute value);
   +
   attributes.put(name, attribute);
}


public void setAttribute(String name, Object o, int scope) {
   +
   +   if (name == null || o == null)
   +   throw new NullPointerException(Null name or attribute value);
   +
   switch (scope) {
   case PAGE_SCOPE:
   attributes.put(name, o);
   
   
   
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




RE: can't get context with uri that is sub-dir of current context

2002-09-26 Thread Smith, Ryan

anyone?

I've re-built tomcat, fixing this so that you can retrieve a sub-context,
and everything seems to work ok, but I'm just not familiar enough with the
code to know if I've broken something else.

Thanks,

-Ryan

-Original Message-
From: Smith, Ryan [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 25, 2002 7:18 PM
To: '[EMAIL PROTECTED]'
Subject: can't get context with uri that is sub-dir of current context


 
Can anyone shed some light on why the
org.apache.catalina.core.ApplicationContext.getContext(uri) method was
written to return the current context whenever the uri passed into it was a
sub-dir of the current context's path?
 
For example, calling getContext(/common)  from within a context that had
as it's path: /, would allways return the context of /.
 
and, calling getContext(/store/common) from within a context that had as
it's path: /store, would always return the context of /store
 
 
anyone?
 
---
Ryan Smith
Platform Engineer
Sony Online Entertainment
(858) 577-3072
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
---
 

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




help....please.....RE: java.lang.NoSuchMethodError after re-building

2002-09-25 Thread Smith, Ryan


I know you are all busy, but should I have posted this to the users list?

-Ryan

-Original Message-
From: Smith, Ryan [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 24, 2002 8:06 PM
To: 'Tomcat Developers List'
Subject: java.lang.NoSuchMethodError after re-building



I'm getting the following error when trying to run tc 4, after having built
the current cvs version succesfully:

java.lang.NoSuchMethodError:
javax.management.MBeanServerFactory.findMBeanServer(Ljava/lang/String;)Ljava
/util/List;
at org.apache.commons.modeler.Registry.getServer(Registry.java:245)
at
org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1666)
at
org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:168)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalR
esourcesLifecycleListener.java:115)


I know I have the jmx jars in place (as you can see from my ant detect
output, and build.properties files I've pasted below).

I just figured maybe someone has ran into this before, thanks for any help
!!


-Ryan

Here's a bit of config:
OS:  winxp
jdk: 1.4.1
src: current cvs (as of 7:45pm)

Here's my `ant detect` output:



Buildfile: build.xml

detect:

flags:

flags.display:
 [echo] --- Build environment for Catalina ---
 [echo] If ${property_name} is displayed, then the property is
not set)
 [echo] --- Build options ---
 [echo] full.dist=${full.dist}
 [echo] build.sysclasspath=${build.sysclasspath}
 [echo] compile.debug=on
 [echo] compile.deprecation=off
 [echo] compile.optimize=on
 [echo] --- Ant Flags ---
 [echo] style task available (required)=true
 [echo] --- JDK ---
 [echo] jdk.1.2.present=true
 [echo] jdk.1.3.present=true
 [echo] jdk.1.4.present=true
 [echo] --- Source Dependencies ---
 [echo] jtc.home.present=true
 [echo] --- Required Libraries ---
 [echo] beanutils.present=true
 [echo] collections.present=true
 [echo] digester.present=true
 [echo] jaxp.present=true
 [echo] jndi.present=true
 [echo] logging.present=true
 [echo] regexp.present=true
 [echo] servlet.present=true
 [echo] --- Optional Libraries ---
 [echo] daemon.present=true
 [echo] dbcp.present=true
 [echo] jaas.present=true
 [echo] javamail.present=true
 [echo] jmx.present=true
 [echo] jsse.present=true
 [echo] jta.present=true
 [echo] junit.present=${junit.present}
 [echo] ldap.present=true
 [echo] modeler.present=true
 [echo] pool.present=true
 [echo] tyrex.present=${tyrex.present}
 [echo] --- Required JARs ---
 [echo] jndi.jar.present(except JDK 1.3+)=${jndi.jar.present}
 [echo] regexp.jar.present=true
 [echo] servlet.jar.present=true
 [echo] xerces.jar.present(except JDK 1.4+ or
xerces2)=${xerces.jar.present}

 [echo] xerces2.jars.present(except JDK 1.4+ or
xerces1)=${xerces2.jars.pres
ent}
 [echo] --- Optional JARs ---
 [echo] daemon.jar.present=true
 [echo] dbcp.jar.present=true
 [echo] jaas.jar.present=${jaas.jar.present}
 [echo] javamail.jar.present=true
 [echo] jdbc20ext.jar.present=${jdbc20ext.jar.present}
 [echo] jmx.jar.present=true
 [echo] jta.jar.present=true
 [echo] junit.jar.present=${junit.jar.present}
 [echo] ldap.jar.present=${ldap.jar.present}
 [echo] modeler.jar.present=true
 [echo] pool.jar.present=true
 [echo] tyrex.jar.present=true
 [echo] --- Conditional compilation flags ---
 [echo] compile.daemon=true
 [echo] compile.dbcp=true
 [echo] compile.jaas=true
 [echo] compile.javamail=true
 [echo] compile.jmx=true
 [echo] compile.jndi=true
 [echo] compile.jsse=true
 [echo] compile.jta=true
 [echo] compile.junit=${compile.junit}
 [echo] compile.ldap=true
 [echo] compile.ssi=true
 [echo] compile.tyrex=${compile.tyrex}
 [echo] --- Distribution flags ---
 [echo] copy.daemon.jar=true
 [echo] copy.dbcp.jar=true
 [echo] copy.jaas.jar=${copy.jaas.jar}
 [echo] copy.jdbc20ext.jar=${copy.jdbc20ext.jar}
 [echo] copy.javamail.jar=true

RE: help....please.....RE: java.lang.NoSuchMethodError after re-build ing

2002-09-25 Thread Smith, Ryan


thanks for the help, started from scratch and had no probs

-Original Message-
From: Amy Roh [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 25, 2002 4:55 PM
To: Tomcat Developers List
Subject: Re: helpplease.RE: java.lang.NoSuchMethodError after
re-build ing



 I'm getting the following error when trying to run tc 4, after having 
 built the current cvs version succesfully:
 
 java.lang.NoSuchMethodError: 
 javax.management.MBeanServerFactory.findMBeanServer(Ljava/lang/String;
 )Ljava
 /util/List;
 at
org.apache.commons.modeler.Registry.getServer(Registry.java:245)
 at
 org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1666)
 at
 org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:168)
 at

org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalR
 esourcesLifecycleListener.java:115)

 From the errors you're receiving, it looks like you're missing proper 
jmx or modeler.  I'd suggest making sure that you have proper paths 
pointing jmx and modeler.

Amy

 
 
 I know I have the jmx jars in place (as you can see from my ant detect 
 output, and build.properties files I've pasted below).
 
 I just figured maybe someone has ran into this before, thanks for any 
 help !!
 
 
 -Ryan
 
 Here's a bit of config:
   OS:  winxp
   jdk: 1.4.1
   src: current cvs (as of 7:45pm)
   
 Here's my `ant detect` output: 
 
 
 
   Buildfile: build.xml
 
   detect:
 
   flags:
 
   flags.display:
[echo] --- Build environment for Catalina ---
[echo] If ${property_name} is displayed, then the property is 
 not set)
[echo] --- Build options ---
[echo] full.dist=${full.dist}
[echo] build.sysclasspath=${build.sysclasspath}
[echo] compile.debug=on
[echo] compile.deprecation=off
[echo] compile.optimize=on
[echo] --- Ant Flags ---
[echo] style task available (required)=true
[echo] --- JDK ---
[echo] jdk.1.2.present=true
[echo] jdk.1.3.present=true
[echo] jdk.1.4.present=true
[echo] --- Source Dependencies ---
[echo] jtc.home.present=true
[echo] --- Required Libraries ---
[echo] beanutils.present=true
[echo] collections.present=true
[echo] digester.present=true
[echo] jaxp.present=true
[echo] jndi.present=true
[echo] logging.present=true
[echo] regexp.present=true
[echo] servlet.present=true
[echo] --- Optional Libraries ---
[echo] daemon.present=true
[echo] dbcp.present=true
[echo] jaas.present=true
[echo] javamail.present=true
[echo] jmx.present=true
[echo] jsse.present=true
[echo] jta.present=true
[echo] junit.present=${junit.present}
[echo] ldap.present=true
[echo] modeler.present=true
[echo] pool.present=true
[echo] tyrex.present=${tyrex.present}
[echo] --- Required JARs ---
[echo] jndi.jar.present(except JDK 1.3+)=${jndi.jar.present}
[echo] regexp.jar.present=true
[echo] servlet.jar.present=true
[echo] xerces.jar.present(except JDK 1.4+ or 
 xerces2)=${xerces.jar.present}
 
[echo] xerces2.jars.present(except JDK 1.4+ or 
 xerces1)=${xerces2.jars.pres
   ent}
[echo] --- Optional JARs ---
[echo] daemon.jar.present=true
[echo] dbcp.jar.present=true
[echo] jaas.jar.present=${jaas.jar.present}
[echo] javamail.jar.present=true
[echo] jdbc20ext.jar.present=${jdbc20ext.jar.present}
[echo] jmx.jar.present=true
[echo] jta.jar.present=true
[echo] junit.jar.present=${junit.jar.present}
[echo] ldap.jar.present=${ldap.jar.present}
[echo] modeler.jar.present=true
[echo] pool.jar.present=true
[echo] tyrex.jar.present=true
[echo] --- Conditional compilation flags ---
[echo] compile.daemon=true
[echo] compile.dbcp=true
[echo] compile.jaas=true
[echo] compile.javamail=true
[echo] compile.jmx=true
[echo] compile.jndi=true
[echo] compile.jsse=true
[echo] compile.jta=true
[echo] compile.junit=${compile.junit}
[echo] compile.ldap=true
[echo] compile.ssi=true
[echo] compile.tyrex=${compile.tyrex}
[echo] --- Distribution flags ---
[echo] copy.daemon.jar=true
[echo] copy.dbcp.jar=true
[echo

can't get context with uri that is sub-dir of current context

2002-09-25 Thread Smith, Ryan

 
Can anyone shed some light on why the
org.apache.catalina.core.ApplicationContext.getContext(uri) method was
written to return the current context whenever the uri passed into it was a
sub-dir of the current context's path?
 
For example, calling getContext(/common)  from within a context that had
as it's path: /, would allways return the context of /.
 
and, calling getContext(/store/common) from within a context that had as
it's path: /store, would always return the context of /store
 
 
anyone?
 
---
Ryan Smith
Platform Engineer
Sony Online Entertainment
(858) 577-3072
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
---
 



Unable to Retrieve another Context from within the root context (by design, or bug?)

2002-09-24 Thread Smith, Ryan

I'm wondering if this was by design or if it's a bug.  Running Tomcat 4.1.10
 
I am unable to retrieve the context of another webapp from within the root
context.
 
I've got two contexts setup, one with path=/common, and another with
path=.  From within the context with path=, there is a jsp which
attempts to retrieve the path=/common context:
 
servletContext.getContext(/common);
 
Unfortunately, in the
org.apache.catalina.core.ApplicationContext.getContext(String uri) method,
the code always returns the current context whenever the uri passed contains
as it's prefix the path of the current context (context.getPath()).
 
So, given that the root contexts path=, it gets a / appended to it, and
that new string is will *always* be the prefix of any uri that is passed
into the getContext(String uri) method, there is no way to ever retrieve a
context for another app from within the root context.
 
So my question is, is that by design, or is it a bug?
 
Thanks,
 
-Ryan
 
---
Ryan Smith
Platform Engineer
Sony Online Entertainment
(858) 577-3072
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
---
 



java.lang.NoSuchMethodError after re-building

2002-09-24 Thread Smith, Ryan


I'm getting the following error when trying to run tc 4, after having built
the current cvs version succesfully:

java.lang.NoSuchMethodError:
javax.management.MBeanServerFactory.findMBeanServer(Ljava/lang/String;)Ljava
/util/List;
at org.apache.commons.modeler.Registry.getServer(Registry.java:245)
at
org.apache.catalina.mbeans.MBeanUtils.createServer(MBeanUtils.java:1666)
at
org.apache.catalina.mbeans.MBeanUtils.clinit(MBeanUtils.java:168)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.clinit(GlobalR
esourcesLifecycleListener.java:115)


I know I have the jmx jars in place (as you can see from my ant detect
output, and build.properties files I've pasted below).

I just figured maybe someone has ran into this before, thanks for any help
!!


-Ryan

Here's a bit of config:
OS:  winxp
jdk: 1.4.1
src: current cvs (as of 7:45pm)

Here's my `ant detect` output:



Buildfile: build.xml

detect:

flags:

flags.display:
 [echo] --- Build environment for Catalina ---
 [echo] If ${property_name} is displayed, then the property is
not set)
 [echo] --- Build options ---
 [echo] full.dist=${full.dist}
 [echo] build.sysclasspath=${build.sysclasspath}
 [echo] compile.debug=on
 [echo] compile.deprecation=off
 [echo] compile.optimize=on
 [echo] --- Ant Flags ---
 [echo] style task available (required)=true
 [echo] --- JDK ---
 [echo] jdk.1.2.present=true
 [echo] jdk.1.3.present=true
 [echo] jdk.1.4.present=true
 [echo] --- Source Dependencies ---
 [echo] jtc.home.present=true
 [echo] --- Required Libraries ---
 [echo] beanutils.present=true
 [echo] collections.present=true
 [echo] digester.present=true
 [echo] jaxp.present=true
 [echo] jndi.present=true
 [echo] logging.present=true
 [echo] regexp.present=true
 [echo] servlet.present=true
 [echo] --- Optional Libraries ---
 [echo] daemon.present=true
 [echo] dbcp.present=true
 [echo] jaas.present=true
 [echo] javamail.present=true
 [echo] jmx.present=true
 [echo] jsse.present=true
 [echo] jta.present=true
 [echo] junit.present=${junit.present}
 [echo] ldap.present=true
 [echo] modeler.present=true
 [echo] pool.present=true
 [echo] tyrex.present=${tyrex.present}
 [echo] --- Required JARs ---
 [echo] jndi.jar.present(except JDK 1.3+)=${jndi.jar.present}
 [echo] regexp.jar.present=true
 [echo] servlet.jar.present=true
 [echo] xerces.jar.present(except JDK 1.4+ or
xerces2)=${xerces.jar.present}

 [echo] xerces2.jars.present(except JDK 1.4+ or
xerces1)=${xerces2.jars.pres
ent}
 [echo] --- Optional JARs ---
 [echo] daemon.jar.present=true
 [echo] dbcp.jar.present=true
 [echo] jaas.jar.present=${jaas.jar.present}
 [echo] javamail.jar.present=true
 [echo] jdbc20ext.jar.present=${jdbc20ext.jar.present}
 [echo] jmx.jar.present=true
 [echo] jta.jar.present=true
 [echo] junit.jar.present=${junit.jar.present}
 [echo] ldap.jar.present=${ldap.jar.present}
 [echo] modeler.jar.present=true
 [echo] pool.jar.present=true
 [echo] tyrex.jar.present=true
 [echo] --- Conditional compilation flags ---
 [echo] compile.daemon=true
 [echo] compile.dbcp=true
 [echo] compile.jaas=true
 [echo] compile.javamail=true
 [echo] compile.jmx=true
 [echo] compile.jndi=true
 [echo] compile.jsse=true
 [echo] compile.jta=true
 [echo] compile.junit=${compile.junit}
 [echo] compile.ldap=true
 [echo] compile.ssi=true
 [echo] compile.tyrex=${compile.tyrex}
 [echo] --- Distribution flags ---
 [echo] copy.daemon.jar=true
 [echo] copy.dbcp.jar=true
 [echo] copy.jaas.jar=${copy.jaas.jar}
 [echo] copy.jdbc20ext.jar=${copy.jdbc20ext.jar}
 [echo] copy.javamail.jar=true
 [echo] copy.jmx.jar=true
 [echo] copy.jndi.jar=${copy.jndi.jar}
 [echo] copy.jta.jar=true
 [echo] copy.ldap.jar=${copy.ldap.jar}
 [echo] copy.logging.jar=true
 [echo] copy.modeler.jar=true
 [echo

Re: Spec question: RE BUG 12052

2002-08-29 Thread Ryan Lubke

On Thu, 2002-08-29 at 11:13, Craig R. McClanahan wrote:
 
 
 On Thu, 29 Aug 2002, Bill Barker wrote:
 
  FWIW, I agree that the 2.4 servlet-spec and the CGI-spec are out of sync
  here.  If I actually thought that any members of the JCP were subscribed to
  this list, I'd think to ask for clarification before 2.4 went final. :)
 
 
 The way to ask would be to send feedback to
 [EMAIL PROTECTED].

I've forwarded the thread to the spec lead for 2.4 and it has been
brought up to the expert group.  However, as Craig mentioned, the best
way to ask is using the email address he listed.





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




RE: Spec question: RE BUG 12052

2002-08-28 Thread Ryan Lubke

On Wed, 2002-08-28 at 17:05, Ignacio J. Ortega wrote:
  De: Ryan Lubke [mailto:[EMAIL PROTECTED]]
  Enviado el: 28 de agosto de 2002 20:29
  Para: Tomcat Developers List
  Asunto: RE: Spec question: RE BUG 12052
  
  
  
   The port MUST be the one in the Host Header if one is 
  present,and should
   be present if the request is HTTP1.1 compliant, 
   
  What if the Host header is supplied, but the value is empty.  
  This seems
  legal per section 14.23 of the HTTP/1.1 RFC?
  
  
 
 1) For me after ( another ) reading of rfc2616, from the point you named
 and following the references given there, i've found that in 5.2 seems
 to say that a empty Host: header must be responded by 400 because empty
 it is not a valid Host name..

But an empty host header does have a meaning, i.e. the target resource
is being identified via an IP address and not a host name.

I'm reading this that if the host, probably a virtual host on the server
, can't be determined, then return the 400.  

 
 2) Checked Apache2 and it gives a 200 when issuing a GET / with empty
 Host:, at it replies a 200.
 
 I think your problem is related to issuing a 30X after a request with
 empty Host: header?, well it's really a border case...
 
 One never can assure if a Location header will have correct information,
 because is mandated to follow a filled Host hdr if present, sending a
 301 with a guessed Host name in the Location, shouldnt be the worst
 solution to the problem..
 
 I dont know how to make apache2 (anyone?) issue a unconditional redirect
 (301) after a request, but i suspect that if the Host Header is empty in
 such a request, it will try to form a correct Location header from the
 information it has at hand ( ServerName and his own local port), with
 Firewalls and NATs possibily an incorrect one? maybe..
 
 In a vote, i would vote to make Tomcat issue a 400 in case of a empty
 Host header..

Is this such a good idea?

Take a look at the following:

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

Apache originally would return a 400 on an empty Host header.
The modified the behavior to what you're currently seeing.

The interpretation could be incorrect, but I would be more inclined
to follow a solid HTTP server implementation such as Apache.

 
 Saludos ,
 Ignacio J. Ortega
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: HTTP Host Request header and TC Connectors]

2002-08-28 Thread Ryan Lubke

On Wed, 2002-08-28 at 17:32, Bill Barker wrote:
 
 - Original Message -
 From: Ryan Lubke [EMAIL PROTECTED]
 To: tcdev [EMAIL PROTECTED]
 Sent: Wednesday, August 28, 2002 9:43 AM
 Subject: [Fwd: HTTP Host Request header and TC Connectors]
 
 
  By the way the quote was pulled from section 14.23 of RFC 2616.
 
  =
 
  Hi,
 
  Looking for a little input from the HTTP gurus here.
 
  Given the following:
 
 If the requested URI does not include an Internet host
  name for the service being requested, then the Host header
  field MUST be given with an empty value.
 
  So, I'm looking for other interpretations of what the above means.
 
  My interpretation at this point is the serviced targeted by the
  request URI is identified via an IP address vs a host name, that
  the Host request header will be sent but with an empty value.
 
  Does anyone agree/disagree?
 
  The reason I ask is that if an empty Host header is sent to Tomcat, and
  a redirect is sent back, the value of the Location header is useless,
  i.e.  http:///index.jsp.
 
 My reading of 14.23 says that this is exactly what should happen, since the
 only (valid) way that this could happen is if the user originally requested
 http:///.  Since the client was capable of resolving that request, it should
 be able to resolve the value of the Location header.

Actually, the client doesn't request http:///.  
Example below.

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET / HTTP/1.1
Host: 

HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Date: Wed, 28 Aug 2002 23:01:29 GMT
Transfer-Encoding: chunked
Location: http:///index.html
Server: Apache Tomcat/4.0.4 (HTTP/1.1 Connector)

Perhaps I missed your point.
 
 
  I'm trying to determine if this is a problem with the client
  implementation's interpretation of the spec, or a problem with Tomcat.
 
  Thanks,
 
  -rl
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




[Patch][Tomcat 4/5] Small issue with ErrorDispatcherValve

2002-08-13 Thread Ryan Lubke

Given the following:

web.xml with error-page entries for the following Exception types:

   - IllegalStateException
   - ServletException

If a Servlet generates a RuntimeException, it is wrapped by a
ServletException.  Since there is an entry for ServletException 
in the web.xml, the actual root cause (in this case, an
IllegalStateException) was never unwrapped, thus leading to unexpected
behavior.

I made a simple modification to the logic so that if the throwable
passed to the ErrorDispatcherValve is a ServletException, it will
attempt to get the root cause.  If the root cause is null, then proceed
with the error page lookup with the ServletException as the throwable 
object, otherwise, use the root cause for the error page lookup.

I've tested this using my own tests as well as those that Watchdog 4.0
has for this area as well, and all seems OK.

If I missed something here, please let me know.  I'm struggling to stay
awake here :)

-rl

PS.  I've attached some very simple patches for some javadoc warnings I
noticed during the build process.




Index: ErrorDispatcherValve.java
===
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/valves/ErrorDispatcherValve.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ErrorDispatcherValve.java
--- ErrorDispatcherValve.java	18 Jul 2002 16:47:42 -	1.1.1.1
+++ ErrorDispatcherValve.java	14 Aug 2002 03:04:47 -
@@ -212,20 +212,20 @@
  */
 protected void throwable(Request request, Response response,
  Throwable throwable) {
-
 Context context = request.getContext();
 if (context == null)
 return;
-
+
 Throwable realError = throwable;
-ErrorPage errorPage = findErrorPage(context, realError);
-if ((errorPage == null)  (realError instanceof ServletException)) {
+
+if (realError instanceof ServletException) {
 realError = ((ServletException) realError).getRootCause();
-if (realError != null)
-errorPage = findErrorPage(context, realError);
-else
+if (realError == null) {
 realError = throwable;
-}
+}
+} 
+
+ErrorPage errorPage = findErrorPage(context, realError);
 
 if (errorPage != null) {
 response.setAppCommitted(false);
@@ -237,7 +237,7 @@
 sreq.setAttribute(Globals.ERROR_MESSAGE_ATTR,
   throwable.getMessage());
 sreq.setAttribute(Globals.EXCEPTION_ATTR,
-  throwable);
+  realError);
 Wrapper wrapper = request.getWrapper();
 if (wrapper != null)
 sreq.setAttribute(Globals.SERVLET_NAME_ATTR,
@@ -246,7 +246,7 @@
 sreq.setAttribute(Globals.EXCEPTION_PAGE_ATTR,
   ((HttpServletRequest) sreq).getRequestURI());
 sreq.setAttribute(Globals.EXCEPTION_TYPE_ATTR,
-  throwable.getClass());
+  realError.getClass());
 if (custom(request, response, errorPage)) {
 try {
 sresp.flushBuffer();


Index: Node.java
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Node.java,v
retrieving revision 1.23
diff -u -r1.23 Node.java
--- Node.java	31 Jul 2002 21:42:27 -	1.23
+++ Node.java	14 Aug 2002 03:06:57 -
@@ -291,7 +291,7 @@
 	}
 
 	/**
-	 * @ return The enclosing root to this root.  Usually represents the
+	 * @return The enclosing root to this root.  Usually represents the
 	 * page that includes this one.
 	 */
 	public Root getParentRoot() {


Index: BodyContentImpl.java
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/BodyContentImpl.java,v
retrieving revision 1.4
diff -u -r1.4 BodyContentImpl.java
--- BodyContentImpl.java	10 Jun 2002 20:12:27 -	1.4
+++ BodyContentImpl.java	14 Aug 2002 03:07:57 -
@@ -518,7 +518,7 @@
  * Note: this is after evaluation!!  There are no scriptlets,
  * etc in this stream.
  *
- * @returns the value of this BodyJspWriter as a Reader
+ * @return the value of this BodyJspWriter as a Reader
  */
 public Reader getReader() {
 return new CharArrayReader (cb, 0, nextChar);
@@ -529,7 +529,7 @@
  * Note: this is after evaluation!!  There are no scriptlets,
  * etc in this stream.
  *
- * @returns the value of the BodyJspWriter as a String
+ * @return the value of the BodyJspWriter as a String
  */
 public String getString() {
 return new String(cb, 0, nextChar);



--
To unsubscribe, e-mail:   mailto:[EMAIL 

[Fwd: HEAD brach of jasper]

2002-06-27 Thread Ryan Lubke

Hi,

Has anyone been able to get any JSP's running on the HEAD brach of
tomcat 4 using jasper (not jasper2).

I consistently receive:


java.lang.NullPointerException
at
org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.java:203)
at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:139)
at
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:414)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:128)

but looking at the line 203 of TldLocationsCache, I don't see why this
occurs.





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




[PATCH - Jasper2] Minor compliance fix and some resource bundle keyfixes

2002-06-27 Thread Ryan Lubke

Hi.

Two fixes:


1.  JspDocumentParser -  Enforce the fact that relative taglib URI's
(those that start with /) are prefixed by urn:jsptld:.

See section 5.3.5 of the 1.2 spec, as well as the examples on
page 92.

I've added the failure message to messages.properties and
messages_es.properties.  Can someone point me to some online
tool that can do the necessary conversion for the
messages_ja.properties?

2.  During testing of the above patch using Watchdog, some resource 
bundle key lookups failed.  

I've corrected the keys in Validator.java based on those found in
the resource bundles.

Thanks,

-rl




Index: Validator.java
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
retrieving revision 1.10
diff -u -r1.10 Validator.java
--- Validator.java	20 Jun 2002 23:48:23 -	1.10
+++ Validator.java	27 Jun 2002 23:21:56 -
@@ -138,14 +138,14 @@
 
 		if (language.equals(attr)) {
 		if (languageSeen)
-			err.jspError(n, jsp.error.language.multiple);
+			err.jspError(n, jsp.error.page.multiple.language);
 		languageSeen = true;
 		if (!java.equalsIgnoreCase(value))
 			err.jspError(n, jsp.error.language.nonjava);
 		pageInfo.setLanguage(value);
 		} else if (extends.equals(attr)) {
 		if (extendsSeen)
-			err.jspError(n, jsp.error.extends.multiple);
+			err.jspError(n, jsp.error.page.multiple.extends);
 		extendsSeen = true;
 		pageInfo.setExtends(value);
 		/*
@@ -158,7 +158,7 @@
 			n.addImport(value);
 		} else if (contentType.equals(attr)) {
 		if (contentTypeSeen) 
-			err.jspError(n, jsp.error.contentType.multiple);
+			err.jspError(n, jsp.error.page.multiple.contenttypes);
 		contentTypeSeen = true;
 		pageInfo.setContentType(value);
 		} else if (session.equals(attr)) {
@@ -173,7 +173,7 @@
 			err.jspError(n, jsp.error.session.invalid);
 		} else if (buffer.equals(attr)) {
 		if (bufferSeen)
-			err.jspError(n, jsp.error.buffer.multiple);
+			err.jspError(n, jsp.error.page.multiple.buffer);
 		bufferSeen = true;
 
 		if (none.equalsIgnoreCase(value))
@@ -192,7 +192,7 @@
 		}
 		} else if (autoFlush.equals(attr)) {
 		if (autoFlushSeen)
-			err.jspError(n, jsp.error.autoFlush.multiple);
+			err.jspError(n, jsp.error.page.multiple.autoflush);
 		autoFlushSeen = true;
 		if (true.equalsIgnoreCase(value))
 			pageInfo.setAutoFlush(true);
@@ -202,7 +202,7 @@
 			err.jspError(n, jsp.error.autoFlush.invalid);
 		} else if (isthreadSafe.equals(attr)) {
 		if (isThreadSafeSeen)
-			err.jspError(n, jsp.error.isThreadSafe.multiple);
+			err.jspError(n, jsp.error.page.multiple.threadsafe);
 		isThreadSafeSeen = true;
 		if (true.equalsIgnoreCase(value))
 			pageInfo.setThreadSafe(true);
@@ -212,7 +212,7 @@
 			err.jspError(n, jsp.error.isThreadSafe.invalid);
 		} else if (isErrorPage.equals(attr)) {
 		if (isErrorPageSeen)
-			err.jspError(n, jsp.error.isErrorPage.multiple);
+			err.jspError(n, jsp.error.page.multiple.iserrorpage);
 		isErrorPageSeen = true;
 		if (true.equalsIgnoreCase(value))
 			pageInfo.setIsErrorPage(true);
@@ -222,7 +222,7 @@
 			err.jspError(n, jsp.error.isErrorPage.invalid);
 		} else if (errorPage.equals(attr)) {
 		if (errorPageSeen) 
-			err.jspError(n, jsp.error.errorPage.multiple);
+			err.jspError(n, jsp.error.page.multiple.errorpage);
 		errorPageSeen = true;
 		pageInfo.setErrorPage(value);
 		} else if (info.equals(attr)) {
@@ -231,7 +231,7 @@
 		infoSeen = true;
 		} else if (pageEncoding.equals(attr)) {
 		if (pageEncodingSeen) 
-			err.jspError(n, jsp.error.pageEncoding.multiple);
+			err.jspError(n, jsp.error.page.multiple.pageencoding);
 		pageEncodingSeen = true;
 		pageInfo.setPageEncoding(value);
 		}


Index: JspDocumentParser.java
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
retrieving revision 1.3
diff -u -r1.3 JspDocumentParser.java
--- JspDocumentParser.java	20 Jun 2002 23:02:16 -	1.3
+++ JspDocumentParser.java	27 Jun 2002 23:04:08 -
@@ -434,6 +434,15 @@
 
 		// get the uri
 		String uri = attrs.getValue(i);
+
+// make sure that a relative path is prefixed
+// with urn:jsptld:path
+if (uri.charAt(0) == '/') {
+throw new JasperException(
+err.getString(jsp.error.xml.taglib.uri.not_prefixed,
+  uri));
+}
+
 		if (uri.startsWith(URN_JSPTLD)) {
 		// uri value is of the form urn:jsptld:path
 		uri = uri.substring(URN_JSPTLD.length());


Index: messages_es.properties
===
RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v
retrieving 

[Fwd: [PATCH - Jasper2] Minor compliance fix and some resourcebundle key fixes]

2002-06-27 Thread Ryan Lubke

Reposting messages.patch

-Forwarded Message-

From: Ryan Lubke [EMAIL PROTECTED]
To: tcdev [EMAIL PROTECTED]
Subject: [PATCH - Jasper2] Minor compliance fix and some resource bundle key fixes
Date: 27 Jun 2002 19:30:55 -0500

Hi.

Two fixes:


1.  JspDocumentParser -  Enforce the fact that relative taglib URI's
(those that start with /) are prefixed by urn:jsptld:.

See section 5.3.5 of the 1.2 spec, as well as the examples on
page 92.

I've added the failure message to messages.properties and
messages_es.properties.  Can someone point me to some online
tool that can do the necessary conversion for the
messages_ja.properties?

2.  During testing of the above patch using Watchdog, some resource 
bundle key lookups failed.  

I've corrected the keys in Validator.java based on those found in
the resource bundles.

Thanks,

-rl





Index: Validator.java
===
RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
retrieving revision 1.10
diff -u -r1.10 Validator.java
--- Validator.java  20 Jun 2002 23:48:23 -  1.10
+++ Validator.java  27 Jun 2002 23:21:56 -
@@ -138,14 +138,14 @@
 
if (language.equals(attr)) {
if (languageSeen)
-   err.jspError(n, jsp.error.language.multiple);
+   err.jspError(n, jsp.error.page.multiple.language);
languageSeen = true;
if (!java.equalsIgnoreCase(value))
err.jspError(n, jsp.error.language.nonjava);
pageInfo.setLanguage(value);
} else if (extends.equals(attr)) {
if (extendsSeen)
-   err.jspError(n, jsp.error.extends.multiple);
+   err.jspError(n, jsp.error.page.multiple.extends);
extendsSeen = true;
pageInfo.setExtends(value);
/*
@@ -158,7 +158,7 @@
n.addImport(value);
} else if (contentType.equals(attr)) {
if (contentTypeSeen) 
-   err.jspError(n, jsp.error.contentType.multiple);
+   err.jspError(n, jsp.error.page.multiple.contenttypes);
contentTypeSeen = true;
pageInfo.setContentType(value);
} else if (session.equals(attr)) {
@@ -173,7 +173,7 @@
err.jspError(n, jsp.error.session.invalid);
} else if (buffer.equals(attr)) {
if (bufferSeen)
-   err.jspError(n, jsp.error.buffer.multiple);
+   err.jspError(n, jsp.error.page.multiple.buffer);
bufferSeen = true;
 
if (none.equalsIgnoreCase(value))
@@ -192,7 +192,7 @@
}
} else if (autoFlush.equals(attr)) {
if (autoFlushSeen)
-   err.jspError(n, jsp.error.autoFlush.multiple);
+   err.jspError(n, jsp.error.page.multiple.autoflush);
autoFlushSeen = true;
if (true.equalsIgnoreCase(value))
pageInfo.setAutoFlush(true);
@@ -202,7 +202,7 @@
err.jspError(n, jsp.error.autoFlush.invalid);
} else if (isthreadSafe.equals(attr)) {
if (isThreadSafeSeen)
-   err.jspError(n, jsp.error.isThreadSafe.multiple);
+   err.jspError(n, jsp.error.page.multiple.threadsafe);
isThreadSafeSeen = true;
if (true.equalsIgnoreCase(value))
pageInfo.setThreadSafe(true);
@@ -212,7 +212,7 @@
err.jspError(n, jsp.error.isThreadSafe.invalid);
} else if (isErrorPage.equals(attr)) {
if (isErrorPageSeen)
-   err.jspError(n, jsp.error.isErrorPage.multiple);
+   err.jspError(n, jsp.error.page.multiple.iserrorpage);
isErrorPageSeen = true;
if (true.equalsIgnoreCase(value))
pageInfo.setIsErrorPage(true);
@@ -222,7 +222,7 @@
err.jspError(n, jsp.error.isErrorPage.invalid);
} else if (errorPage.equals(attr)) {
if (errorPageSeen) 
-   err.jspError(n, jsp.error.errorPage.multiple);
+   err.jspError(n, jsp.error.page.multiple.errorpage);
errorPageSeen = true;
pageInfo.setErrorPage(value);
} else if (info.equals(attr)) {
@@ -231,7 +231,7 @@
infoSeen = true;
} else if (pageEncoding.equals(attr)) {
if (pageEncodingSeen

Re: 5.0 proposal

2002-06-24 Thread Ryan Lubke


 
  Watchdog is an official TCK

Actually, Watchdog is not an official TCK (just wanted to make this
clear).  It's nothing more than a test suite that uses the same test
source.

However, I do agree that performance analysis in not the goal of
Watchdog.

-rl



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




Re: watchdog, servletapi, karma

2002-06-12 Thread Ryan Lubke

Christopher,

You can send me the Watchdog patches and I'll look them over.

Thanks,

-rl

On Wed, 2002-06-12 at 12:01, Christopher K. St. John wrote:
 GOMEZ Henri wrote:
  
  No, I saw a problem here since servlet-api-4.0 is the OFFICIAL
  servlet 2.3/jsp1.2 API and may not change without (wide) notice.
  
 
  Yes, but there's a difference between changing the API (which
 is the job of the servlet spec jsr team) and fixing bugs in the
 implementation classes. I'd be perfectly happy if somebody else
 would just fix the bug, but nobody seems to be maintaining the
 code at the moment.
 
 
 -- 
 Christopher St. John [EMAIL PROTECTED]
 DistribuTopia http://www.distributopia.com
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




[Fwd: [PATCH] TC 4.0/Coyote locale parsing issue]

2002-03-27 Thread Ryan Lubke

Did some checking and the TC 4.0 HTTP/1.1 and HTTP/1.0 connectors have
the same problem (o.a.c.c.http and o.a.c.c.http10).

I've modified the connectors in question and ran the same set of tests
that I ran against Coyote and all seems well.  Locales with variants are
properly handled.

I've attached patches for all 3 connectors.

-rl

-Forwarded Message-

From: Ryan Lubke [EMAIL PROTECTED]
To: tcdev [EMAIL PROTECTED]
Subject: [PATCH] TC 4.0/Coyote locale parsing issue
Date: 25 Mar 2002 13:35:28 -0500

Hi,

When dealing with preferred locales from a client (Accept-Language), 
the CoyoteRequest class (org.apache.coyote.tomcat4) doesn't correctly
handle locales with variants (i.e. en-IE-EURO).
RFC 2616 states that the following for language-range of
Accept-Language:  
  language-range = ( ( 1*8ALPHA *( - 1*8ALPHA ) ) | * )

So it seems that variants coming in from a client are legal (provided
I've read the BNF properly)

The attached patch seems to correct the issue.

-rl





Index: CoyoteRequest.java
===
RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
retrieving revision 1.11
diff -u -r1.11 CoyoteRequest.java
--- CoyoteRequest.java  19 Mar 2002 20:34:41 -  1.11
+++ CoyoteRequest.java  25 Mar 2002 14:34:54 -
@@ -1987,17 +1987,27 @@
 // Extract the language and country for this entry
 String language = null;
 String country = null;
+String variant = null;
 int dash = entry.indexOf('-');
 if (dash  0) {
 language = entry;
 country = ;
+variant = ;
 } else {
 language = entry.substring(0, dash);
 country = entry.substring(dash + 1);
+int vDash = country.indexOf('-');
+if (vDash  0) {
+String cTemp = country.substring(0, vDash);
+variant = country.substring(vDash + 1);
+country = cTemp;
+} else {
+variant = ;
+}
 }
 
 // Add a new Locale to the list of Locales for this quality level
-Locale locale = new Locale(language, country);
+Locale locale = new Locale(language, country, variant);
 Double key = new Double(-quality);  // Reverse the order
 ArrayList values = (ArrayList) locales.get(key);
 if (values == null) {




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



Index: HttpProcessor.java
===
RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
retrieving revision 1.8
diff -u -r1.8 HttpProcessor.java
--- HttpProcessor.java  18 Mar 2002 07:15:40 -  1.8
+++ HttpProcessor.java  27 Mar 2002 15:17:59 -
@@ -463,12 +463,19 @@
   while (le.hasMoreElements()) {
 String language = (String)le.nextElement();
 String country = ;
+String variant = ;
 int countryIndex = language.indexOf('-');
 if (countryIndex  -1) {
 country = language.substring(countryIndex + 1).trim();
 language = language.substring(0, countryIndex).trim();
+int vDash = country.indexOf(-);
+if (vDash  0) {
+String cTemp = country.substring(0, vDash);
+variant = country.substring(vDash + 1);
+country = cTemp;
+} 
 }
-request.addLocale(new Locale(language, country));
+request.addLocale(new Locale(language, country, variant));
   }
   }
 } else if (match.equals(cookie)) {


Index: HttpProcessor.java
===
RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
retrieving revision 1.45
diff -u -r1.45 HttpProcessor.java
--- HttpProcessor.java  18 Mar 2002 07:15:40 -  1.45
+++ HttpProcessor.java  27 Mar 2002 15:17:39 -
@@ -499,17 +499,27 @@
 // Extract the language and country for this entry
 String language = null;
 String country = null;
+String variant = null;
 int dash = entry.indexOf('-');
 if (dash  0) {
 language = entry;
 country = ;
+variant = ;
 } else {
 language = entry.substring(0, dash);
 country = entry.substring(dash + 1);
+int vDash = country.indexOf

[PATCH] TC 4.0/Coyote locale parsing issue

2002-03-25 Thread Ryan Lubke

Hi,

When dealing with preferred locales from a client (Accept-Language), 
the CoyoteRequest class (org.apache.coyote.tomcat4) doesn't correctly
handle locales with variants (i.e. en-IE-EURO).
RFC 2616 states that the following for language-range of
Accept-Language:  
  language-range = ( ( 1*8ALPHA *( - 1*8ALPHA ) ) | * )

So it seems that variants coming in from a client are legal (provided
I've read the BNF properly)

The attached patch seems to correct the issue.

-rl




Index: CoyoteRequest.java
===
RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteRequest.java,v
retrieving revision 1.11
diff -u -r1.11 CoyoteRequest.java
--- CoyoteRequest.java  19 Mar 2002 20:34:41 -  1.11
+++ CoyoteRequest.java  25 Mar 2002 14:34:54 -
@@ -1987,17 +1987,27 @@
 // Extract the language and country for this entry
 String language = null;
 String country = null;
+String variant = null;
 int dash = entry.indexOf('-');
 if (dash  0) {
 language = entry;
 country = ;
+variant = ;
 } else {
 language = entry.substring(0, dash);
 country = entry.substring(dash + 1);
+int vDash = country.indexOf('-');
+if (vDash  0) {
+String cTemp = country.substring(0, vDash);
+variant = country.substring(vDash + 1);
+country = cTemp;
+} else {
+variant = ;
+}
 }
 
 // Add a new Locale to the list of Locales for this quality level
-Locale locale = new Locale(language, country);
+Locale locale = new Locale(language, country, variant);
 Double key = new Double(-quality);  // Reverse the order
 ArrayList values = (ArrayList) locales.get(key);
 if (values == null) {



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


RE: JDK 1.31??

2002-03-20 Thread Ryan Bloom

I would just like to state that as I Covalent employee, I disavow all
knowledge of this completely.  :-(

Ryan

--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 

 -Original Message-
 From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 10:15 AM
 To: Tomcat Developers List
 Cc: Mark Goddard; Julian Mitchell; Isabella Pighi; Stefano Mazzocchi;
 Bellintani Luca; Federico Barbieri
 Subject: FW: JDK 1.31??
 
 I believe this _deserves_ greater attention than webmaster... Pearls
like
 those come once every year...
 
 Pier
 
 -- Forwarded Message
  From: /* NAME CONCEALED */
  Date: Wed, 20 Mar 2002 11:48:15 -0500
  To: [EMAIL PROTECTED]
  Subject: JDK 1.31??
 
  Hello,
 
  I purchased a server package from Covalent (over a year ago) that
 includes an
  installation of Tomcat. It doesn't work and all I can get out of
 Covalent is:
 
  Upgrade your jdk to 1.31 and then modify the Tomcat.sh to reflect
the
 new
  JAVA_HOME and start the server with the covalent script.
 
  It might as well be Chinese.
 
  I'm running Red Hat Linux 7.2.
 
  I checked all the Tomcat and Apache references and I can't find
anything
 that
  says JDK 1.31. What are they talking about? A Java JDK? I can't
find
  anything that says JDK 1.31.
 
  Please include a copy of this message with your reply.
 
 -- End of Forwarded Message
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-dev-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:tomcat-dev-
 [EMAIL PROTECTED]



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




RE: JDK 1.31??

2002-03-20 Thread Ryan Bloom

Granted, but we could have provided more detailed instructions.

Ryan

--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 

 -Original Message-
 From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 20, 2002 10:38 AM
 To: Tomcat Developers List
 Cc: 'Mark Goddard'; 'Julian Mitchell'; 'Isabella Pighi'; 'Stefano
 Mazzocchi'; 'Bellintani Luca'; 'Federico Barbieri'
 Subject: Re: JDK 1.31??
 
 It was not against Covalent... But rather against the user... Your
 instructions were concise and accurate... Even my mother could have
 followed
 them... If the guy doesn't have a clue of what a Java JDK 1.3.1 is,
well,
 then he'd better not even touch Tomcat :) :) :)
 
 Pier
 
 Ryan Bloom [EMAIL PROTECTED] wrote:
 
  I would just like to state that as I Covalent employee, I disavow
all
  knowledge of this completely.  :-(
 
  Ryan
 
  --
  Ryan Bloom  [EMAIL PROTECTED]
  645 Howard St.  [EMAIL PROTECTED]
  San Francisco, CA
 
  -Original Message-
  From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, March 20, 2002 10:15 AM
  To: Tomcat Developers List
  Cc: Mark Goddard; Julian Mitchell; Isabella Pighi; Stefano
Mazzocchi;
  Bellintani Luca; Federico Barbieri
  Subject: FW: JDK 1.31??
 
  I believe this _deserves_ greater attention than webmaster...
Pearls
  like
  those come once every year...
 
  Pier
 
  -- Forwarded Message
  From: /* NAME CONCEALED */
  Date: Wed, 20 Mar 2002 11:48:15 -0500
  To: [EMAIL PROTECTED]
  Subject: JDK 1.31??
 
  Hello,
 
  I purchased a server package from Covalent (over a year ago) that
  includes an
  installation of Tomcat. It doesn't work and all I can get out of
  Covalent is:
 
  Upgrade your jdk to 1.31 and then modify the Tomcat.sh to reflect
  the
  new
  JAVA_HOME and start the server with the covalent script.
 
  It might as well be Chinese.
 
  I'm running Red Hat Linux 7.2.
 
  I checked all the Tomcat and Apache references and I can't find
  anything
  that
  says JDK 1.31. What are they talking about? A Java JDK? I can't
  find
  anything that says JDK 1.31.
 
  Please include a copy of this message with your reply.
 
  -- End of Forwarded Message
 
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-dev-
  [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-dev-
  [EMAIL PROTECTED]
 
 
 
  --
  To unsubscribe, e-mail:   mailto:tomcat-dev-
 [EMAIL PROTECTED]
  For additional commands, e-mail: mailto:tomcat-dev-
 [EMAIL PROTECTED]
 
 
 
 
 --
 To unsubscribe, e-mail:   mailto:tomcat-dev-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:tomcat-dev-
 [EMAIL PROTECTED]



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




Re: Watchdog problems

2002-01-17 Thread Ryan Lubke

Hi,

I have an idea for a fix.  I'll have this implemented today.

-rl

On Thu, 2002-01-17 at 06:56, Remy Maucherat wrote:
  Hi,
 
  I have some problems to run the Watchdog tests on mod_webapp and I think
 there
  is a problem in watchdog:
  For example:
  +++
   [java] [gtest]  Unable to find the expected header:
 'Content-Type:
  text/plain' in the server's response.
   [java] [gtest]  The following headers were received:
   [java] [gtest] HEADER - Date: Thu, 17 Jan 2002 11:22:24
 GMT
   [java] [gtest] HEADER - Server: Apache/2.0.31-dev (Unix)
  mod_ssl/3.0a0 OpenSSL/0.9.6b
   [java] [gtest] HEADER - Connection: close
   [java] [gtest] HEADER - Content-Type: text/plain;
  charset=ISO-8859-1
   [java] [gtest]  FAIL GET /servlet-tests/Include_1Test HTTP/1.0
  +++
  I DO think that mod_webapp sends a valid Content-Type but watchdog does
 not like
  it!
 
  Any comments?
 
 I agree. ISO-8859-1 is the default encoding, but obviously it can be
 explicitely specified.
 Watchdog is rather not flexible, so I don't know how easy it would be to fix
 this.
 
 Remy
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




Re: [VOTES] Tomcat 4.0.2 beta 1

2001-12-19 Thread Ryan Lubke

Hi,

Did you rebuild/redploy and test with the latest Watchdog?

-rl

On Wed, 2001-12-19 at 11:16, jean-frederic clere wrote:
 Hi,
 
 I have noted that 4 of the jsp tests fail:
 jsp-tests/jsp/tagext/TagSupport/positiveDoStartTagXML.jsp
 jsp-tests/jsp/tagext/TagSupport/positiveDoStartTag.jsp
 jsp-tests/jsp/tagext/TagSupport/positiveDoStartTagXML.jsp
 jsp-tests/jsp/tagext/TagSupport/positiveDoStartTag.jsp
 It sounds like a tag library is missing (in my test environment) the line where
 the exception comes from is
 TagLibraryInfo tlibInfo=tagInfo.getTagLibrary(); 
 From TestTag.java (of jakarta-watchdog-4.0).
 
 
 The WARP part needs a little review...
 
 
 Cheers
 
 Jean-frederic
 
 
 Remy Maucherat wrote:
  
  Hi,
  
  After some delay, I'd like to release the first beta of Tomcat 4.0.2 this
  week (the sooner, the better, so I plan to package the release as soon as
  this vote is considered approved). This release has already been approved,
  and although there are some issues which will need to be addressed before
  4.0.2 final is released, there is no open showstopper problems. A few
  additional fixes may be made before beta 1 is released.
  
  The list of changes and fixes is available at:
  http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-tomcat-4.0/Attic/RELEAS
  E-NOTES-4.0.2-B1.txt?rev=1.1.2.4
  
  ballot
  [ ] +1: Make the release
  [ ] -1: I'm opposed to the release until the following issues are fixed:
  
  /ballot
  
  There is also a new feature that has been added in the HEAD branch which
  could be worth porting: the instance pooling for STM servlets. I wrote the
  code as an experiment, but it appears to be working very well (I didn't
  notice any thread safety issues during load testing).
  
  ballot
  [ ] +1: Add the feature to the 4.0 branch
  [ ] -1: Don't add the feature, because:
  
  /ballot
  
  Remy
  
  --
  To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




[PATCH] Tomcat 4.0 BUILDING.txt

2001-12-14 Thread Ryan Lubke

Hi,
After going through the exercise of building TC, I noticed
one issue with the instructions contained in BUILDING.txt.
The download URL referenced in the BUILDING.txt file to obtain
JAXP 1.1 is now stale.

Attached is a possible patch to update the BUILDING.txt
file.

NOTE:  This release of JAXP doesn't include a jaxp.jar, so 
the jaxp.jar variable within the build.properties isn't
really needed, but doesn't appear to affect the build process
if it's left in.




Index: BUILDING.txt
===
RCS file: /home/cvspublic/jakarta-tomcat-4.0/BUILDING.txt,v
retrieving revision 1.15
diff -u -r1.15 BUILDING.txt
--- BUILDING.txt2001/12/01 07:32:59 1.15
+++ BUILDING.txt2001/12/14 19:46:44
@@ -57,17 +57,18 @@
   available, which will be used to actually perform the build.
 
 
-(2) Download and Install the JAXP/1.1 Reference Implementation
+(2) Download and Install the Java XML Pack Binary Distribution
 
-* Download a binary distribution of JAXP 1.1 (Final Version) from:
+* Download a binary distribution of the Java XML Pack:
 
-http://java.sun.com/xml/download.html
+http://java.sun.com/xml/downloads/javaxmlpack.html
 
 * Unpack the binary distribution into a convenient location so that the
-  JAXP/1.1 release resides in its own directory (conventionally named
-  jaxp-1.1.  For the purposes of the remainder of this document, the
-  symbolic name ${jaxp.home} is used to refer to the full pathname of
-  the release directory.
+  Java XML Pack release resides in its own directory (the JAXP libraries
+  reside in the jaxp-1.1.3 subdirectory).  For the purposes of the 
+  remainder of this document, the symbolic name ${jaxp.home} is used 
+  to refer to the full pathname to the jaxp-1.1.3 subdirectory of the 
+  Java XML Pack release directory.
 
 * Make the xalan.jar file of this distribution available to Ant (so that
   it can be used with the style tag) by copying it to ${ant.home}/lib.



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


[PATCH] Watchdog 4.0 -- New Filter tests + JSP web.xml fix for DTDreference

2001-12-03 Thread Ryan Lubke

Hello,

In the attached tarball are source and goldenfiles for some new
Filter tests.  Unpack the tarball in the src directory of Watchdog.
Also attached are patches for the servlet-gtest.xml and the web.xml for
the servlet tests.

Also attached is a patch for the jsp web.xml to correct the DTD
reference in the DOCTYPE element.

Comments welcome.

-rl




filter.tar.gz
Description: GNU Zip compressed data

Index: servlet-gtest.xml
===
RCS file: /home/cvspublic/jakarta-watchdog-4.0/src/conf/servlet-gtest.xml,v
retrieving revision 1.19
diff -u -r1.19 servlet-gtest.xml
--- servlet-gtest.xml   2001/07/20 23:07:56 1.19
+++ servlet-gtest.xml   2001/12/03 20:25:15
@@ -10,9 +10,27 @@
 
   !--  Watchdog Servlet tests  --
 
-  !-- javax_servlet_GenericServlet tests --
 
target name=gtestservlet-test
+
+  !-- javax_servlet_Filter tests --
+
+  gtest request=GET /servlet-tests/DoFilterTest HTTP/1.0
+ debug=0 host=${host} port=${port}
+ goldenFile=${wgdir}/javax_servlet/Filter/DoFilterTest.html
+ assertion=The doFilter method of the Filter is called by the container 
+each time a request/response pair is passed through the stack due to a client request 
+for the Servlet in the stack.  Java Servlet Specification v2.3, Sec. 14
+ testStrategy=Client attempts to access a servlet and the filter 
+configured for that servlet should be invoked.
+  /
+
+  gtest request=GET /servlet-tests/InitFilterConfigTest HTTP/1.0
+ debug=0 host=${host} port=${port}
+ goldenFile=${wgdir}/javax_servlet/Filter/InitFilterConfigTest.html
+ assertion=The container calls this method when the Filter is 
+instantiated and passes in a FilterConfig object. Java Servlet Specification v2.3, 
+Sec. 14
+ testStrategy=Client attempts to access a servlet and the filter 
+configured for that servlet.
+  /
+
+  !-- javax_servlet_GenericServlet tests --
+
   gtest request=GET /servlet-tests/DestroyTest HTTP/1.0
debug=0 host=${host} port=${port}  
returnCode=200


Index: web.xml
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/web.xml,v
retrieving revision 1.3
diff -u -r1.3 web.xml
--- web.xml 2000/12/22 18:59:14 1.3
+++ web.xml 2001/12/03 20:25:43
@@ -1,27 +1,85 @@
 ?xml version=1.0 encoding=ISO-8859-1?
 
 !DOCTYPE web-app
-PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
-http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
+PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
+http://java.sun.com/dtd/web-app_2_3.dtd;
 
 web-app
 context-param
-   param-name
-   OS
-   /param-name
-   param-value
-   ULTRASPARC
-   /param-value
+   param-name
+   OS
+   /param-name
+   param-value
+   ULTRASPARC
+   /param-value
 /context-param
 context-param
-   param-name
-   EDITOR
-   /param-name
-   param-value
-   VI
-   /param-value
+   param-name
+   EDITOR
+   /param-name
+   param-value
+   VI
+   /param-value
 /context-param
 
+!-- Filters --
+filter
+filter-name
+ServletMappedDoFilter_Filter
+/filter-name
+display-name
+ServletMappedDoFilter_Filter
+/display-name
+filter-class
+tests.javax_servlet.Filter.DoFilter_Filter
+/filter-class
+init-param
+param-name
+attribute
+/param-name
+param-value
+tests.javax_servlet.Filter.DoFilter_Filter.SERVLET_MAPPED
+/param-value
+/init-param
+/filter
+filter
+filter-name
+ServletMappedInitFilter_Filter
+/filter-name
+display-name
+ServletMappedInitFilter_Filter
+/display-name
+filter-class
+tests.javax_servlet.Filter.InitFilter_Filter
+/filter-class
+init-param
+param-name
+attribute
+/param-name
+param-value
+tests.javax_servlet.Filter.InitFilter_Filter.SERVLET_MAPPED
+/param-value
+/init-param
+ /filter
+ filter-mapping
+ filter-name
+ ServletMappedDoFilter_Filter
+ /filter-name
+ servlet-name
+ DoFilterTest
+ /servlet-name
+ /filter-mapping
+ filter-mapping
+ filter-name
+ ServletMappedInitFilter_Filter
+ /filter-name
+ servlet-name
+ InitFilterConfigTest
+/servlet-name
+ /filter-mapping
+
+  !-- END 

[PATCH] Watchdog-4.0 -- New Tests tests.javax_servlet.Error

2001-11-30 Thread Ryan Lubke

New tests for verification of error page handling by the container.

The tests validate the use of dynamic and static resources as error
pages and validate that the appropriate request parameters are set
depending on the circumstances when the error resource is dynamic.

The attached .gz file can be untarred in the root directory of the
watchdog distribution and all new files will be put into the proper
directories.  Also attached are patches to the servlet-tests web
application's web.xml, and the servlet-gtest.xml file.

Comments are welcome.

-rl



javax_servlet_Error.tar.gz
Description: GNU Zip compressed data

Index: servlet-gtest.xml
===
RCS file: /home/cvspublic/jakarta-watchdog-4.0/src/conf/servlet-gtest.xml,v
retrieving revision 1.19
diff -u -r1.19 servlet-gtest.xml
--- servlet-gtest.xml   2001/07/20 23:07:56 1.19
+++ servlet-gtest.xml   2001/11/30 20:23:12
@@ -586,6 +586,49 @@
debug=0 host=${host} port=${port}

goldenFile=${wgdir}/javax_servlet/UnavailableException/UnavailableException_Constructor2Test.html
 /
 
+  !-- javax_servlet_Error tests --
+
+gtest request=GET /servlet-tests/ServletToServletErrorPageTest HTTP/1.0
+debug=0 host=${host} port=${port}
+goldenfile=${wgdir}/javax_servlet/Error/ServletToServletErrorPageTest.html
+testName=ServletToServletErrorPageTest
+assertion=Servlet error handlers can be installed for specific Exception 
+types.
+testStrategy=The target servlet will generage a 
+java.lang.ArithmeticException.  The Servlet error page should display non-null values 
+for status_code, exception_type, message, exception, request_uri, and servlet_name
+/
+
+gtest request=GET /servlet-tests/ServletToServletError501PageTest HTTP/1.0
+debug=0 host=${host} port=${port}
+
+goldenfile=${wgdir}/javax_servlet/Error/ServletToServletError501PageTest.html
+testName=ServletToServletError501PageTest
+assertion=Servlet error handlers can be installed for specific HTTP status 
+codes.
+testStrategy=The target servlet will class HttpServletResponse.sendError( 
+int status, String message ).  The Servlet error page should display non-null values 
+for status_code, message, request_uri, and servlet_name
+/
+
+gtest request=GET /servlet-tests/ServletToJSPErrorPageTest HTTP/1.0
+debug=0 host=${host} port=${port}
+goldenfile=${wgdir}/javax_servlet/Error/ServletToJSPErrorPageTest.html
+testName=ServletToJSPErrorPageTest
+assertion=JSP error handlers can be installed for specific Exception types.
+testStrategy=The target servlet will generage a 
+java.lang.ArrayIndexOutOfBoundsException.  The JSP error page should display non-null 
+values for status_code, exception_type, message, exception, request_uri, and 
+servlet_name
+/
+
+
+gtest request=GET /servlet-tests/ServletToJSPError502PageTest HTTP/1.0
+debug=0 host=${host} port=${port}
+goldenfile=${wgdir}/javax_servlet/Error/ServletToJSPError502PageTest.html
+testName=ServletToJSPError502PageTest
+assertion=JSP error handlers can be installed for specific HTTP status 
+codes.
+testStrategy=The target servlet will generage a 
+java.lang.ArrayIndexOutOfBoundsException.  The JSP error page should display non-null 
+values for status_code, message, request_uri, and servlet_name
+/
+
+
+gtest request=GET /servlet-tests/ServletToHTMLErrorPageTest HTTP/1.0
+debug=0 host=${host} port=${port}
+goldenfile=${wgdir}/javax_servlet/Error/ServletToHTMLErrorPageTest.html
+testName=ServletToHTMLErrorPageTest
+assertion=Static HTML page error handlers can be installed for specific 
+Exception types.
+testStrategy=The target servlet will generage a 
+java.lang.NumberFormatException.  The static HTML error page should be returned to 
+the client.
+/
 
   !-- javax_servlet_http_Cookie tests --
 


Index: web.xml
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/web.xml,v
retrieving revision 1.3
diff -u -r1.3 web.xml
--- web.xml 2000/12/22 18:59:14 1.3
+++ web.xml 2001/11/30 20:23:35
@@ -242,6 +242,71 @@
/servlet-class
   /servlet
 
+  !-- Error --
+
+  servlet
+servlet-name
+ServletToServletErrorPageTest
+/servlet-name
+servlet-class
+tests.javax_servlet.Error.ServletToServletErrorPageTestServlet
+/servlet-class
+  /servlet
+
+  servlet
+servlet-name
+ServletToServletError501PageTest
+/servlet-name
+servlet-class
+tests.javax_servlet.Error.ServletToServletError501PageTestServlet
+/servlet-class
+  /servlet
+
+  servlet
+servlet-name
+JSPErrorPage
+/servlet-name
+jsp-file
+/tests/javax_servlet/Error/JSPErrorPage.jsp
+/jsp-file

[PATCH] Watchdog-4.0 - Correction/cleanup of jsp_precompile tests

2001-11-29 Thread Ryan Lubke

I've cleaned up the jsp_precompile tests in Watchdog-4.0 in response to
Bug 5169.

- removed the goldenfile checks in the jsp-gtest.xml for those
  precompile tests that used them.
- removed commented and invalid tests from that section
- added new functionality to GTest to assert cases where no
  response body is expected from the server (precompile tests
  are such a case).
- cleanup the assertion and test strategy text

The following goldenfiles should be removed from the repository.
${wgdir}/misc/precompilation/response.html
${wgdir}/misc/precompilation/no_parameter.html



Index: GTest.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.3
diff -u -r1.3 GTest.java
--- GTest.java  2001/09/28 04:09:56 1.3
+++ GTest.java  2001/11/29 23:31:03
@@ -29,6 +29,7 @@
 // Expected response
 boolean magnitude=true;
 boolean exactMatch=false;
+boolean expectResponseBody=true;
 // Match the body against a golden file
 String goldenFile;
 // Match the body against a string
@@ -163,6 +164,19 @@
exactMatch=Boolean.valueOf( exact ).booleanValue();
 }
 
+/**
+ * codesetExpectResponseBody/code will indicate
+ * whether or not a response body is expected from the
+ * server for a particular test.  In some cases, no
+ * body should be returned to the client.  This allows
+ * that assertion.
+ *
+ * @param b a codeboolean/code value
+ */
+public void setExpectResponseBody( boolean b ) {
+expectResponseBody = b;
+}
+
 /** Set the port as int - different name to avoid confusing ant
  */
 public void setPortInt(int i) {
@@ -356,7 +370,7 @@

if( responseMatch != null ) {
// check if we got the string we wanted
-   if( responseBody == null ) {
+   if( responseBody == null  expectResponseBody ) {
System.out.println(ERROR: got no response, expecting  + 
responseMatch);
return false;
}
@@ -366,6 +380,11 @@
System.out.println(responseBody );
}
}
+
+if ( !expectResponseBody  responseBody != null ) {
+System.out.println( ERROR: Received a response body from the server where 
+none was expected );
+return false;
+}
 
// compare the body
if( goldenFile==null) return responseStatus;


Index: jsp-gtest.xml
===
RCS file: /home/cvspublic/jakarta-watchdog-4.0/src/conf/jsp-gtest.xml,v
retrieving revision 1.9
diff -u -r1.9 jsp-gtest.xml
--- jsp-gtest.xml   2001/08/09 17:35:13 1.9
+++ jsp-gtest.xml   2001/11/29 23:39:02
@@ -15,63 +15,38 @@
 !-- Precompilation tests --
   gtest request=GET 
/jsp-tests/jsp/misc/precompilation/precompile.jsp?jsp_precompile HTTP/1.0
debug=0 host=${host} port =${port}
+   expectResponseBody=false
returncode=200
-  testName=precompile.jsp 
-  assertion=Test that the request is not sent to the JSP 
-  testStrategy=No HTML page received when jsp_precompile has no value
-   /
+  testName=precompileNoValueTest 
+  assertion=If the jsp_precompile request parameter has no value, the 
+request will not be delivered to the target JSP page. JavaServer Pages Specification 
+v1.2, Sec. 8.4.2 
+  testStrategy=Validate that no response body is returned when 
+jsp_precompile has no value
+ /
 
-  gtest request=GET 
/jsp-tests/jsp/misc/precompilation/precompile.jsp?jsp_precompile=falseamp;test=insignificant
 HTTP/1.0
-   debug=0 host=${host} port =${port}
-   goldenFile=${wgdir}/misc/precompilation/response.html
-  testName=precompile.jsp 
-  assertion=Test that the request is forwarded properly when 
jsp_precompile=false
-  testStrategy=The value of variable passed in the request is displayed if 
the request goes to the JSP
-   /
-
   gtest request=GET 
/jsp-tests/jsp/misc/precompilation/precompile.jsp?jsp_precompile=false HTTP/1.0
-   debug=0 host=${host} port =${port}
-   goldenFile=${wgdir}/misc/precompilation/no_parameter.html
-  testName=precompile.jsp 
-  assertion=Test that the request is forwarded properly when 
jsp_precompile=false
-  testStrategy=The request should be processed 
-   /
-
-!--
-  gtest request=GET 
/jsp-tests/jsp/misc/precompilation/precompile.jsp?jsp_precompile=%22false%22 HTTP/1.0
debug=0 host=${host} port =${port}
-   goldenFile=${wgdir}/misc/precompilation/no_parameter.html
-  testName=precompile.jsp 
-  assertion=Test that the request is forwarded properly when 
jsp_precompile=%22false%22
-  testStrategy=The request should be processed 
-   /
---
+   

[PATCH] Tomcat 4.0 -- Spelling correction in JspServlet class

2001-11-28 Thread Ryan Lubke

Simple spelling correction in org.apache.jasper.servlet.JspServlet




Index: JspServlet.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
retrieving revision 1.23
diff -u -r1.23 JspServlet.java
--- JspServlet.java 2001/11/26 22:55:43 1.23
+++ JspServlet.java 2001/11/28 17:20:56
@@ -424,7 +424,7 @@
 else if (value.equals(false))
 return (false);// ?jsp_precompile=false
 else
-throw new ServletException(Cannott have request parameter  +
+throw new ServletException(Cannot have request parameter  +
Constants.PRECOMPILE +  set to  +
value);
 



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


[PATCH] Proposed Fix for Bugzilla 5169

2001-11-28 Thread Ryan Lubke

Synopsis of 5169:

   JavaServer Pages Specification 1.2, Section JSP.8.4.2:

   The jsp_precompile parameter may have no value, or may
   have the values true or false.  In all cases, the 
   request should not be delivered to the JSP page.

   With Tomcat, if the jsp_precompile parameter is false, the 
   request is delivered to the target JSP page.  This is a 
   violation of the spec.

The issue seems to lie in org/apache/jasper/servlet/JspServlet.java.

During the processing of the request parameters, if the jsp_precompile
value evaluated to false, the preCompile method would return false.
Because of this, the service method in the JspServletWrapper class
would not return as the precompile value passed was false.

The attached simple patch seems to resolve the issue running what tests
I have.

Comments welcome.

Thanks,

-rl



Index: JspServlet.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v
retrieving revision 1.24
diff -u -r1.24 JspServlet.java
--- JspServlet.java 2001/11/28 17:26:08 1.24
+++ JspServlet.java 2001/11/28 21:40:18
@@ -422,7 +422,7 @@
 if (value.equals(true))
 return (true); // ?jsp_precompile=true
 else if (value.equals(false))
-return (false);// ?jsp_precompile=false
+return (true);// ?jsp_precompile=false
 else
 throw new ServletException(Cannot have request parameter  +
Constants.PRECOMPILE +  set to  +



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


RE: [VOTE] Tomcat 4.0.2 Release Plan

2001-11-28 Thread Ryan Lubke

Hi Andrew,

Take a look at the following URL:
http://jakarta.apache.org/site/getinvolved.html


On Wed, 2001-11-28 at 19:10, Andrew Bruno wrote:
 How can this kind of documentation be inclcuded?
 
 http://www.vacodi.com/howto/tomcat/iisnt/
 
 I am happy to do some extra work (fix some content, etc..), but what
 standard and process do I follow? if there is one?  How can it be
 submitted by me? or anyone else is welcome to grab it, and put in CVS,
 docs, etc

Basically you would create a documentation patch of some sort from the 
anon CVS tree which you could submit to the developer list.  A committer
monitoring the list would apply the patch to the CVS tree if
appropriate.

 
 If it were included in the next release it would help a lot of people,
 and hopefully reduce some traffic on the tomcat-user mailing list.
 
 Regards, Andrew
 
 
Hope this helps. 



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




[PATCH] Watchdog-4.0 -- GetMethod_HEADTest patch

2001-11-27 Thread Ryan Lubke

Hi,

This test, the way it is currently written, expects that whent he client
invokes the HTTP HEAD method, that a response-body is returned.  This is
incorrect.  The test currently passes due to Tomcat Bugzilla 5126.

I've modified the test so that no response output is written via a
writer and instead will use sendError( int, string ), to send the status
of the test.  I had to add a new instance variable and setter method to
GTest so that the response message could be configured by the
servlet-gtest.xml file, and be checked appropriately by the
checkResponse() method of GTest.

NOTE:  The goldenfile
${wgdir}/javax_servlet_http/HttpServletRequest/GetMethod_HEADTest.html
should be removed from the repository.

Attached are the patches necessary to correct this test.

Comments welcome.

-rl






Index: GTest.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.3
diff -u -r1.3 GTest.java
--- GTest.java  2001/09/28 04:09:56 1.3
+++ GTest.java  2001/11/27 15:19:57
@@ -37,6 +37,7 @@
 Hashtable expectHeaders;
 // Match request line
 String returnCode=;
+String returnCodeMsg = ;
 
 // Actual response
 String responseLine;
@@ -221,6 +222,10 @@
this.returnCode=s;
 }
 
+   public void setReturnCodeMsg( String s ) {
+   this.returnCodeMsg = s;
+   }
+
public void setHeaders( String s ) {
requestHeaders=new Hashtable();
parseHeader( s, requestHeaders );
@@ -309,7 +314,13 @@

// If returnCode doesn't match
if( request.indexOf( HTTP/1. )  -1) {
-   boolean match= ( responseLine!=null  responseLine.indexOf(returnCode)  
-1);
+boolean match = false;
+if ( returnCodeMsg ==  ) {
+   match = ( responseLine != null  responseLine.indexOf( returnCode )  
+-1 );
+} else {
+match = ( responseLine != null  responseLine.indexOf( returnCode )  -1 
+   responseLine.indexOf( returnCodeMsg )  -1 );
+}
if( match != testCondition ) {
responseStatus = false;
System.out.println(ERROR in:  + request);


Index: GetMethod_HEADTestServlet.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletRequest/GetMethod_HEADTestServlet.java,v
retrieving revision 1.1
diff -u -r1.1 GetMethod_HEADTestServlet.java
--- GetMethod_HEADTestServlet.java  2000/10/16 22:38:56 1.1
+++ GetMethod_HEADTestServlet.java  2001/11/27 14:52:17
@@ -80,20 +80,16 @@
 
 
public void service (HttpServletRequest request, HttpServletResponse response) 
throws ServletException, IOException {
-   PrintWriter out = response.getWriter();
 
String method = request.getMethod();
if(method!=null) {
if(method.trim().equalsIgnoreCase(HEAD))
{
-   out.println(GetMethod_HEADTest test PASSED);
+   response.sendError( HttpServletResponse.SC_OK, 
+GetMethod_HEADTest PASSED);
return;
}
}
-   out.println(GetMethod_HEADTest test FAILED);
-   out.println( BRgetMethod did not return proper method type);
-   out.println(Actual Return Value :  + method );
-   out.println(Expected Return Value : HEAD   );
+response.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, 
+GetMethod_HEADTest FAILED );
 
}
 }


Index: servlet-gtest.xml
===
RCS file: /home/cvspublic/jakarta-watchdog-4.0/src/conf/servlet-gtest.xml,v
retrieving revision 1.19
diff -u -r1.19 servlet-gtest.xml
--- servlet-gtest.xml   2001/07/20 23:07:56 1.19
+++ servlet-gtest.xml   2001/11/27 15:14:13
@@ -739,7 +739,7 @@
 
   gtest request=HEAD /servlet-tests/GetMethod_HEADTest HTTP/1.0
debug=0 host=${host} port=${port}  
-   
goldenFile=${wgdir}/javax_servlet_http/HttpServletRequest/GetMethod_HEADTest.html /
+   returnCode=200 returnCodeMsg=GetMethod_HEADTest PASSED /
 
   gtest request=POST /servlet-tests/GetMethod_POSTTest HTTP/1.0
debug=0 host=${host} port=${port}  



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


[PATCH] Watchdog 4.0 - Fix for Bugzilla 3527

2001-11-20 Thread Ryan Lubke

Classes referenced by TLD are not in the repository.  As stated in the
bug, some containers are very strict about having all classes available
that are referenced in a TLD.

The included patches removed the unused references from the TLDs.

Comments welcome.

-rl




Index: tld_uri.tld
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/tlds/tld_uri.tld,v
retrieving revision 1.2
diff -u -r1.2 tld_uri.tld
--- tld_uri.tld 2000/11/30 23:53:58 1.2
+++ tld_uri.tld 2001/11/20 12:34:42
@@ -16,22 +16,7 @@
   description
A simple tab library for testing computation of TLD Resource Path 
   /description
-validator
-  validator-classtags.TagLibraryValidator.Validator/validator-class
-init-param
-param-nameusa/param-name
-param-valueWashington/param-value
-descriptionCapital/description
-/init-param
-init-param
-param-nameindia/param-name
-param-valueNew Delhi/param-value
-descriptionCapital/description
-/init-param
-/validator
 
-
-  !-- general validator tag --
   tag
 nametldtag/name
 tag-classtags.tld_resource_path.tld_URI/tag-class


Index: TestLib.tld
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/jsp-tests/WEB-INF/tlds/TestLib.tld,v
retrieving revision 1.8
diff -u -r1.8 TestLib.tld
--- TestLib.tld 2000/12/01 00:19:25 1.8
+++ TestLib.tld 2001/11/20 12:34:30
@@ -201,24 +201,6 @@
   /tag
 
 tag
-namepropertyEditor/name
-tag-classtags.PropertyEditorTag/tag-class
-description
-A tag that Uses ProprtyEditorSupport class
-/description
-
-attribute
-  nameurl/name
-  requiredfalse/required
-/attribute
-
-attribute
-  namelocale/name
-  requiredfalse/required
-/attribute
-/tag
-
-tag
 nameiterator/name
 tag-classtags.SimpleIteratorTag/tag-class
 description
@@ -310,21 +292,5 @@
   requiredtrue/required
 /attribute
 /tag
-
-tag
-namethirdWinner/name
-tag-classtags.TagSupport.thirdPrizeTag/tag-class
-description
-A tag that sets the third prize winner and also returns it to a   
-nested tag
-/description
-attribute
-  namewinner/name
-  requiredtrue/required
-/attribute
-/tag
-
-
-
 
 /taglib



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


[PATCH] Watchdog 4.0 - Fix for Bugzilla 3904

2001-11-20 Thread Ryan Lubke

GTest currently verifies response headers in a case sensative
manner.  This patch resolves the issue.

Fix is based of suggested fix in Bug report.

Comments welcome.

-rl







Index: GTest.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.3
diff -u -r1.3 GTest.java
--- GTest.java  2001/09/28 04:09:56 1.3
+++ GTest.java  2001/11/19 21:36:00
@@ -15,6 +15,11 @@
 
 // derived from Jsp
 public class GTest extends Task {
+
+private static final String ZEROS = ;
+private static final int SHORTPADSIZE = 4;
+private static final int BYTEPADSIZE = 2;
+
 String prefix=http://localhost:8080/test;;
 String host=localhost;
 int port=8080;
@@ -376,9 +381,9 @@
boolean cmp=true;

if(exactMatch)
-   cmp=compare(responseBody, expResult.toString() );
+   cmp=compare(responseBody.getBytes(), expResult.toString().getBytes() );
else
-   cmp=compareWeek( responseBody, expResult.toString());
+   cmp=compareWeak( responseBody, expResult.toString());

if( cmp  != testCondition ) {
responseStatus = false;
@@ -521,30 +526,200 @@
 }
 }
 
+/*
+ * codecompare/code compares the two byte arrays passed
+ * in to verify that the lengths of the arrays are equal, and
+ * that the content of the two arrays, byte for byte are equal.
+ *
+ * @param fromServer a codebyte[]/code value
+ * @param fromGoldenFile a codebyte[]/code value
+ * @return codeboolean/code true if equal, otherwise false
+ */
+private boolean compare( byte[] fromServer, byte[] fromGoldenFile ) {
+if ( fromServer == null || fromGoldenFile == null ) {
+return false;
+}   
+
+/*
+ * Check to see that the respose and golden file lengths
+ * are equal.  If they are not, dump the hex and don't
+ * bother comparing the bytes.  If they are equal,
+ * iterate through the byte arrays and compare each byte.
+ * If the bytes don't match, dump the hex representation
+ * of the server response and the goldenfile and return
+ * false.
+ */
+
+if ( fromServer.length != fromGoldenFile.length ) {
+StringBuffer sb = new StringBuffer( 50 );
+sb.append( Response and golden file lengths do not match!\n );
+sb.append( Server response length:  );
+sb.append( fromServer.length );
+sb.append( \nGoldenfile length:  );
+sb.append( fromGoldenFile.length );
+System.out.println( sb.toString() );
+sb = null;
+// dump the hex representation of the byte arrays
+dumpHex( fromServer, fromGoldenFile );
+
+return false;
+
+} else {
+
+int i = 0;
+int j = 0;
+
+while ( ( i  fromServer.length )  ( j  fromGoldenFile.length ) ) {
+if ( fromServer[ i ] != fromGoldenFile[ j ] ) {
+System.out.println( Error at position  + ( i + 1 ) );
 
-// Compare the actual result and the expected result.
-private boolean compare(String str1, String str2) {
-   //System.out.println(In compare);
-   if ( str1==null || str2==null) return false;
-   if ( str1.length() != str2.length() ) {
-   System.out.println(Wrong size  + str1.length() +  + str2.length() );
-   return false;
-   }
-   
-for(int i=0; istr1.length() ; i++ ) {
-if (str1.charAt( i ) != str2.charAt( i ) ) {
-   System.out.println(Error at  + i  +   + str1.charAt(1) +
-  str2.charAt(i));
-return false;
+// dump the hex representation of the byte arrays
+dumpHex( fromServer, fromGoldenFile );
+
+return false;
+}
+
+i++;
+j++;
+}
+}
+
+return true;
+}
+
+/*
+ * codedumpHex/code helper method to dump formatted
+ * hex output of the server response and the goldenfile.
+ *
+ * @param serverResponse a codebyte[]/code value
+ * @param goldenFile a codebyte[]/code value
+ */
+private void dumpHex( byte[] serverResponse, byte[] goldenFile ) {
+StringBuffer outBuf = new StringBuffer( ( serverResponse.length + 
+goldenFile.length ) * 2 );
+
+String fromServerString = getHexValue( serverResponse, 0, 
+serverResponse.length );
+String fromGoldenFileString = getHexValue( goldenFile, 0, goldenFile.length );
+
+outBuf.append( Hex dump of server response and goldenfile below.\n\n### 
+RESPONSE FROM SERVER ###\n );
+outBuf.append( \n );
+outBuf.append( fromServerString );
+outBuf.append( 

Re: [PATCH] Watchdog 4.0 - Fix for Bugzilla 3904

2001-11-20 Thread Ryan Lubke

Apologies,

I attached the wrong patch in the previous email.  The correct
patch for Bugzilla 3904 is now attached.

-rl

On Tue, 2001-11-20 at 09:07, Ryan Lubke wrote:
 GTest currently verifies response headers in a case sensative
 manner.  This patch resolves the issue.
 
 Fix is based of suggested fix in Bug report.
 
 Comments welcome.
 
 -rl
 
 
 
 
 
 
 

 Index: GTest.java
 ===
 RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
 retrieving revision 1.3
 diff -u -r1.3 GTest.java
 --- GTest.java2001/09/28 04:09:56 1.3
 +++ GTest.java2001/11/19 21:36:00
 @@ -15,6 +15,11 @@
  
  // derived from Jsp
  public class GTest extends Task {
 +
 +private static final String ZEROS = ;
 +private static final int SHORTPADSIZE = 4;
 +private static final int BYTEPADSIZE = 2;
 +
  String prefix=http://localhost:8080/test;;
  String host=localhost;
  int port=8080;
 @@ -376,9 +381,9 @@
   boolean cmp=true;
   
   if(exactMatch)
 - cmp=compare(responseBody, expResult.toString() );
 + cmp=compare(responseBody.getBytes(), expResult.toString().getBytes() );
   else
 - cmp=compareWeek( responseBody, expResult.toString());
 + cmp=compareWeak( responseBody, expResult.toString());
   
   if( cmp  != testCondition ) {
   responseStatus = false;
 @@ -521,30 +526,200 @@
  }
  }
  
 +/*
 + * codecompare/code compares the two byte arrays passed
 + * in to verify that the lengths of the arrays are equal, and
 + * that the content of the two arrays, byte for byte are equal.
 + *
 + * @param fromServer a codebyte[]/code value
 + * @param fromGoldenFile a codebyte[]/code value
 + * @return codeboolean/code true if equal, otherwise false
 + */
 +private boolean compare( byte[] fromServer, byte[] fromGoldenFile ) {
 +if ( fromServer == null || fromGoldenFile == null ) {
 +return false;
 +}   
 +
 +/*
 + * Check to see that the respose and golden file lengths
 + * are equal.  If they are not, dump the hex and don't
 + * bother comparing the bytes.  If they are equal,
 + * iterate through the byte arrays and compare each byte.
 + * If the bytes don't match, dump the hex representation
 + * of the server response and the goldenfile and return
 + * false.
 + */
 +
 +if ( fromServer.length != fromGoldenFile.length ) {
 +StringBuffer sb = new StringBuffer( 50 );
 +sb.append( Response and golden file lengths do not match!\n );
 +sb.append( Server response length:  );
 +sb.append( fromServer.length );
 +sb.append( \nGoldenfile length:  );
 +sb.append( fromGoldenFile.length );
 +System.out.println( sb.toString() );
 +sb = null;
 +// dump the hex representation of the byte arrays
 +dumpHex( fromServer, fromGoldenFile );
 +
 +return false;
 +
 +} else {
 +
 +int i = 0;
 +int j = 0;
 +
 +while ( ( i  fromServer.length )  ( j  fromGoldenFile.length ) ) {
 +if ( fromServer[ i ] != fromGoldenFile[ j ] ) {
 +System.out.println( Error at position  + ( i + 1 ) );
  
 -// Compare the actual result and the expected result.
 -private boolean compare(String str1, String str2) {
 - //System.out.println(In compare);
 - if ( str1==null || str2==null) return false;
 - if ( str1.length() != str2.length() ) {
 - System.out.println(Wrong size  + str1.length() +  + str2.length() );
 - return false;
 - }
 - 
 -for(int i=0; istr1.length() ; i++ ) {
 -if (str1.charAt( i ) != str2.charAt( i ) ) {
 - System.out.println(Error at  + i  +   + str1.charAt(1) +
 -str2.charAt(i));
 -return false;
 +// dump the hex representation of the byte arrays
 +dumpHex( fromServer, fromGoldenFile );
 +
 +return false;
 +}
 +
 +i++;
 +j++;
 +}
 +}
 +
 +return true;
 +}
 +
 +/*
 + * codedumpHex/code helper method to dump formatted
 + * hex output of the server response and the goldenfile.
 + *
 + * @param serverResponse a codebyte[]/code value
 + * @param goldenFile a codebyte[]/code value
 + */
 +private void dumpHex( byte[] serverResponse, byte[] goldenFile ) {
 +StringBuffer outBuf = new StringBuffer( ( serverResponse.length + 
goldenFile.length ) * 2 );
 +
 +String fromServerString = getHexValue( serverResponse, 0, 
serverResponse.length );
 +String fromGoldenFileString

[PATCH] Tomcat 4.0.1- Proposed fix for Bugzilla 4609

2001-11-20 Thread Ryan Lubke

Hi,

Thought I'd give a shot at patching a bug (4609) I logged.
The basics of the bug is that an IOException is not thrown
if out.close() is called from within a JSP page and 
subsequent calls to write() or println(), etc. are made.

The solution I have affects two classes:
org.apache.jasper.runtime.JspWriterImpl
org.apache.jasper.compiler.JspParseEventListener

The modification to JspWriterImpl was simple:
  -Added a new boolean instance variable called 'closed'
  -When JspWriter.close() is called, set 'closed' to true.
  -Modified the JspWriter.ensureOpen() method.  If
   'closed' is true, or response is null, throw the IOException.

I felt the modification to JspParseEventListener.generateFooter()
was necessary as the page code generated:

snip
} catch (Throwable t) {
if (out != null  out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
}
/snip

So in this case, now that the IOException is thown, we go into the 
throwable, but the call to out.clearBuffer() generates its own
IOException.  The problem with this is that the stacktrace becomes
inaccurate.  Showing the call to clearBuffer() as the top-most call
on the stack.

So the change I introduced would generate the following code:

snip
if (out != null  out.getBufferSize() != 0)
try {
out.clearBuffer();
} catch (java.io.IOException ioe) {
if (t instanceof java.io.IOException) {
if (!(t.getMessage().equals(ioe.getMessage( {
t = ioe;
}
}
}
/snip

So, here if out.clearBuffer() happens to throw an IOException,
check to see if the throwable that brought us to this point
in the code is an IOException as well.  If it is, see if 
the messages are the same, if they aren't, then there
is a new IO issue and set ioe to the throwable which will
be handled by pageContext.handlePageException.  Otherwise
the catch becomes a no-op and pageContext.handlePageException
will use the original throwable.  Hope that made sense.

Anyway,  comments are definately welcome.  Still getting familiar
with the code.

Thanks,
-rl





Index: JspParseEventListener.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
retrieving revision 1.35
diff -u -r1.35 JspParseEventListener.java
--- JspParseEventListener.java  2001/11/02 19:36:09 1.35
+++ JspParseEventListener.java  2001/11/20 22:29:40
@@ -378,7 +378,23 @@
writer.pushIndent();
 writer.println(if (out != null  out.getBufferSize() != 0));
 writer.pushIndent();
+writer.println( try { );
+writer.pushIndent();
writer.println(out.clearBuffer(););
+writer.popIndent();
+writer.println(} catch (java.io.IOException ioe) {);
+writer.pushIndent();
+writer.println(if (t instanceof java.io.IOException) {);
+writer.pushIndent();
+writer.println(if (!(t.getMessage().equals(ioe.getMessage( {);
+writer.pushIndent();
+writer.println(t = ioe;);
+writer.popIndent();
+writer.println(});
+writer.popIndent();
+writer.println(});
+writer.popIndent();
+writer.println(});
writer.popIndent();
writer.println(if (pageContext != null) pageContext.handlePageException(t););
writer.popIndent();


Index: JspWriterImpl.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/runtime/JspWriterImpl.java,v
retrieving revision 1.1
diff -u -r1.1 JspWriterImpl.java
--- JspWriterImpl.java  2000/08/12 00:52:12 1.1
+++ JspWriterImpl.java  2001/11/20 18:10:11
@@ -99,6 +99,7 @@
 protected static int defaultCharBufferSize = Constants.DEFAULT_BUFFER_SIZE;
 
 protected boolean flushed = false;
+protected boolean closed = false;
 
 public JspWriterImpl() {
super( defaultCharBufferSize, true );
@@ -223,6 +224,7 @@
 if (out != null)
 out.close();
 out = null;
+closed = true;
//cb = null;
 }
 }
@@ -236,7 +238,7 @@
 
 /** check to make sure that the stream has not been closed */
 protected void ensureOpen() throws IOException {
-   if (response == null)
+   if ( closed || response == null)
throw new IOException(Stream closed);
 }
 



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


[PATCH] Watchdog-4.0 - False positive from GetRealPathTestServlet

2001-11-19 Thread Ryan Lubke

Simple patch, but
server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPathTestServlet.java

Yeilds a false positive when the test is run.

Attached is a simple patch to rectify.

More to follow later






Index: GetRealPathTestServlet.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletContext/GetRealPathTestServlet.java,v
retrieving revision 1.1
diff -r1.1 GetRealPathTestServlet.java
90c90
   if(path!=null) {
---
   if(realPath!=null) {



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


[PATCH] Watchdog-4.0 -- tag_int.jsp tests functionality notmentioned in detail in spec

2001-11-19 Thread Ryan Lubke

Hi,

The following test:

server/jsp-tests/jsp/tagext/LifeCycle/tag_int.jsp

Is testing functionality not really explained clearly in the
Specification.


Test code:

%--
  Test for defining an int variable.
--%
%@ taglib uri=/TestLib.tld prefix=x %

%! public static Integer increment(Integer i) {
 if (i != null)
return new Integer(i.intValue()+1);
 return new Integer(0);
}
%
%! public static int valueof(Integer i) {
 if (i != null)
return i.intValue();
 return 0;
}
%


x:define  id=i scope=page life=nested 
(1) i was %= i %; % i = increment(i); % i is now %= valueof(i) %
/x:define

x:define  id=i scope=page life=nested 
(2) i was %= i %; % i = increment(i); % i is now %= valueof(i) %
/x:define

x:define  id=i scope=page life=at_begin 
(3) i was %= i %; % i = increment(i); % i is now %= valueof(i) %
/x:define

(4) i was %= i %; % i = increment(i); % i is now %= valueof(i) %

**

GOLDENFILE OUTPUT:
(1) i was null;  i is now 0



(2) i was 0;  i is now 1



(3) i was 0;  i is now 1


(4) i was 0;  i is now 1

**

Issue:

In (3) since the life of the variable is described as at_begin the
value
should also be available via the PageContext.The value of i is not
synchronized
with the pageContext after the end of the define tag.

Hence in (4) i starts afresh with 0.

Recommendation:

The attached patch excludes the tag_int tests from running until a
clarification is made against the specification.




Index: jsp-gtest.xml
===
RCS file: /home/cvspublic/jakarta-watchdog-4.0/src/conf/jsp-gtest.xml,v
retrieving revision 1.9
diff -u -r1.9 jsp-gtest.xml
--- jsp-gtest.xml   2001/08/09 17:35:13 1.9
+++ jsp-gtest.xml   2001/11/19 19:53:47
@@ -1585,6 +1585,7 @@
/
 --
 
+!--
   gtest request=GET /jsp-tests/jsp/tagext/LifeCycle/tag_int.jsp HTTP/1.0
debug=0 host=${host} port=${port}
goldenFile=${wgdir}/tagext/LifeCycle/tag_int.html
@@ -1592,6 +1593,7 @@
   assertion=Test for defining an int variable, specified in the Java Server 
Pages Specification v1.2, Sec 6.4.7
   testStrategy=testing LifeCycle process
/
+--
 
 !--
   gtest request=GET /jsp-tests/jsp/tagext/LifeCycle/tag_nonempty_body_1.jsp 
HTTP/1.0



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


[PATCH] Watchdog-4.0 - GTest patch for whitspace comparison.

2001-11-19 Thread Ryan Lubke

Hi,

After reading through GTest, and the JSP/Servlet-Gtest.xml, none of the
tests set the exactMatch property to true to do whitespace comparison
between the response from the server, and the contents of the
goldenfile.  This patch, will make GTest do a byte for byte comparison
of the response and goldenfile.  If any length or byte differeces
appear, it will dump a hex representation (ascii on the right side, hex
on the left) to help the test writer figure out what's wrong.  Make's
it easier in my opinion anyway :).


I plan to start going through and correcting the whitespace issues as 
I come across them, so there will probably be more patches to come down
the pipe.

Anyway, attached is the patch to GTest (GTest.patch.txt) as well as
sample output (sample.txt) of what this code produces when exactMatch is
set to true.

Anyone care to comment?

Thanks,

-rl




Index: GTest.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.3
diff -u -r1.3 GTest.java
--- GTest.java  2001/09/28 04:09:56 1.3
+++ GTest.java  2001/11/19 21:36:00
@@ -15,6 +15,11 @@
 
 // derived from Jsp
 public class GTest extends Task {
+
+private static final String ZEROS = ;
+private static final int SHORTPADSIZE = 4;
+private static final int BYTEPADSIZE = 2;
+
 String prefix=http://localhost:8080/test;;
 String host=localhost;
 int port=8080;
@@ -376,9 +381,9 @@
boolean cmp=true;

if(exactMatch)
-   cmp=compare(responseBody, expResult.toString() );
+   cmp=compare(responseBody.getBytes(), expResult.toString().getBytes() );
else
-   cmp=compareWeek( responseBody, expResult.toString());
+   cmp=compareWeak( responseBody, expResult.toString());

if( cmp  != testCondition ) {
responseStatus = false;
@@ -521,30 +526,200 @@
 }
 }
 
+/*
+ * codecompare/code compares the two byte arrays passed
+ * in to verify that the lengths of the arrays are equal, and
+ * that the content of the two arrays, byte for byte are equal.
+ *
+ * @param fromServer a codebyte[]/code value
+ * @param fromGoldenFile a codebyte[]/code value
+ * @return codeboolean/code true if equal, otherwise false
+ */
+private boolean compare( byte[] fromServer, byte[] fromGoldenFile ) {
+if ( fromServer == null || fromGoldenFile == null ) {
+return false;
+}   
+
+/*
+ * Check to see that the respose and golden file lengths
+ * are equal.  If they are not, dump the hex and don't
+ * bother comparing the bytes.  If they are equal,
+ * iterate through the byte arrays and compare each byte.
+ * If the bytes don't match, dump the hex representation
+ * of the server response and the goldenfile and return
+ * false.
+ */
+
+if ( fromServer.length != fromGoldenFile.length ) {
+StringBuffer sb = new StringBuffer( 50 );
+sb.append( Response and golden file lengths do not match!\n );
+sb.append( Server response length:  );
+sb.append( fromServer.length );
+sb.append( \nGoldenfile length:  );
+sb.append( fromGoldenFile.length );
+System.out.println( sb.toString() );
+sb = null;
+// dump the hex representation of the byte arrays
+dumpHex( fromServer, fromGoldenFile );
+
+return false;
+
+} else {
+
+int i = 0;
+int j = 0;
+
+while ( ( i  fromServer.length )  ( j  fromGoldenFile.length ) ) {
+if ( fromServer[ i ] != fromGoldenFile[ j ] ) {
+System.out.println( Error at position  + ( i + 1 ) );
 
-// Compare the actual result and the expected result.
-private boolean compare(String str1, String str2) {
-   //System.out.println(In compare);
-   if ( str1==null || str2==null) return false;
-   if ( str1.length() != str2.length() ) {
-   System.out.println(Wrong size  + str1.length() +  + str2.length() );
-   return false;
-   }
-   
-for(int i=0; istr1.length() ; i++ ) {
-if (str1.charAt( i ) != str2.charAt( i ) ) {
-   System.out.println(Error at  + i  +   + str1.charAt(1) +
-  str2.charAt(i));
-return false;
+// dump the hex representation of the byte arrays
+dumpHex( fromServer, fromGoldenFile );
+
+return false;
+}
+
+i++;
+j++;
+}
+}
+
+return true;
+}
+
+/*
+ * codedumpHex/code helper method to dump formatted
+ * hex output of the server response and the goldenfile.
+ *
+ * @param 

Re: [PATCH] Watchdog-4.0 - GTest patch for whitspace comparison.

2001-11-19 Thread Ryan Lubke

Forgot to mention, I changed the method name : compareWeek, to
compareWeak.

On Mon, 2001-11-19 at 17:04, Ryan Lubke wrote:
 Hi,
 
 After reading through GTest, and the JSP/Servlet-Gtest.xml, none of the
 tests set the exactMatch property to true to do whitespace comparison
 between the response from the server, and the contents of the
 goldenfile.  This patch, will make GTest do a byte for byte comparison
 of the response and goldenfile.  If any length or byte differeces
 appear, it will dump a hex representation (ascii on the right side, hex
 on the left) to help the test writer figure out what's wrong.  Make's
 it easier in my opinion anyway :).
 
 
 I plan to start going through and correcting the whitespace issues as 
 I come across them, so there will probably be more patches to come down
 the pipe.
 
 Anyway, attached is the patch to GTest (GTest.patch.txt) as well as
 sample output (sample.txt) of what this code produces when exactMatch is
 set to true.
 
 Anyone care to comment?
 
 Thanks,
 
 -rl
 
 
 
 

 Index: GTest.java
 ===
 RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
 retrieving revision 1.3
 diff -u -r1.3 GTest.java
 --- GTest.java2001/09/28 04:09:56 1.3
 +++ GTest.java2001/11/19 21:36:00
 @@ -15,6 +15,11 @@
  
  // derived from Jsp
  public class GTest extends Task {
 +
 +private static final String ZEROS = ;
 +private static final int SHORTPADSIZE = 4;
 +private static final int BYTEPADSIZE = 2;
 +
  String prefix=http://localhost:8080/test;;
  String host=localhost;
  int port=8080;
 @@ -376,9 +381,9 @@
   boolean cmp=true;
   
   if(exactMatch)
 - cmp=compare(responseBody, expResult.toString() );
 + cmp=compare(responseBody.getBytes(), expResult.toString().getBytes() );
   else
 - cmp=compareWeek( responseBody, expResult.toString());
 + cmp=compareWeak( responseBody, expResult.toString());
   
   if( cmp  != testCondition ) {
   responseStatus = false;
 @@ -521,30 +526,200 @@
  }
  }
  
 +/*
 + * codecompare/code compares the two byte arrays passed
 + * in to verify that the lengths of the arrays are equal, and
 + * that the content of the two arrays, byte for byte are equal.
 + *
 + * @param fromServer a codebyte[]/code value
 + * @param fromGoldenFile a codebyte[]/code value
 + * @return codeboolean/code true if equal, otherwise false
 + */
 +private boolean compare( byte[] fromServer, byte[] fromGoldenFile ) {
 +if ( fromServer == null || fromGoldenFile == null ) {
 +return false;
 +}   
 +
 +/*
 + * Check to see that the respose and golden file lengths
 + * are equal.  If they are not, dump the hex and don't
 + * bother comparing the bytes.  If they are equal,
 + * iterate through the byte arrays and compare each byte.
 + * If the bytes don't match, dump the hex representation
 + * of the server response and the goldenfile and return
 + * false.
 + */
 +
 +if ( fromServer.length != fromGoldenFile.length ) {
 +StringBuffer sb = new StringBuffer( 50 );
 +sb.append( Response and golden file lengths do not match!\n );
 +sb.append( Server response length:  );
 +sb.append( fromServer.length );
 +sb.append( \nGoldenfile length:  );
 +sb.append( fromGoldenFile.length );
 +System.out.println( sb.toString() );
 +sb = null;
 +// dump the hex representation of the byte arrays
 +dumpHex( fromServer, fromGoldenFile );
 +
 +return false;
 +
 +} else {
 +
 +int i = 0;
 +int j = 0;
 +
 +while ( ( i  fromServer.length )  ( j  fromGoldenFile.length ) ) {
 +if ( fromServer[ i ] != fromGoldenFile[ j ] ) {
 +System.out.println( Error at position  + ( i + 1 ) );
  
 -// Compare the actual result and the expected result.
 -private boolean compare(String str1, String str2) {
 - //System.out.println(In compare);
 - if ( str1==null || str2==null) return false;
 - if ( str1.length() != str2.length() ) {
 - System.out.println(Wrong size  + str1.length() +  + str2.length() );
 - return false;
 - }
 - 
 -for(int i=0; istr1.length() ; i++ ) {
 -if (str1.charAt( i ) != str2.charAt( i ) ) {
 - System.out.println(Error at  + i  +   + str1.charAt(1) +
 -str2.charAt(i));
 -return false;
 +// dump the hex representation of the byte arrays
 +dumpHex( fromServer, fromGoldenFile );
 +
 +return false;
 +}
 +
 +i

[PATCH] - Watchdog 4.0 - 3 New HttpServletResponse tests + Patchesto support new tests.

2001-11-19 Thread Ryan Lubke

Hi,

I've added 3 tests to javax_servlet_http/HttpServletResponse to 
validate that headers set after sendError() or sendRedirect are
called are ignored by the container (this was an issue at one point).

The 3 new tests are:
SendErrorIgnoreHeaderTestServlet.java
SendError_StringIgnoreHeaderTestServlet.java
SendRedirectIgnoreHeaderTestServlet.java

These should be placed in
${WATCHDOG{/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet_http/HttpServletResponse

To support these tests, I've added a new method to GTest,
setUnexpectedHeaders (set in the servlet or jsp gtest.xml like so: 
unexpectedHeaders=key:value ).
This will setup a hashtable of headers to compare against the server
response.  The logic to checkResponse has been updated accordingly.
More to come.

Comments welcome.

-rl






Index: GTest.java
===
RCS file: 
/home/cvspublic/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
retrieving revision 1.3
diff -u -r1.3 GTest.java
--- GTest.java  2001/09/28 04:09:56 1.3
+++ GTest.java  2001/11/19 23:54:31
@@ -35,6 +35,10 @@
 String responseMatch;
 // the response should include the following headers
 Hashtable expectHeaders;
+
+// the response should not include the following headers
+Hashtable unexpectedHeaders;
+
 // Match request line
 String returnCode=;
 
@@ -197,10 +201,21 @@
 
//Ramesh
 public void setExpectHeaders( String s ) {
-   this.expectHeaders=new Hashtable();
-   getHeaderDetails( s, expectHeaders );
+this.expectHeaders=new Hashtable();
+getHeaderDetails( s, expectHeaders );
 
-   //parseHeader( s, expectHeaders );
+//parseHeader( s, expectHeaders );
+}
+
+   /**
+ * codesetUnexpectedHeaders/code sets an ArrayList
+ * with headers that are not expected to be found in a response
+ *
+ * @param s a codeString/code value
+ */
+public void setUnexpectedHeaders( String s ) {
+this.unexpectedHeaders = new Hashtable();
+getHeaderDetails( s, unexpectedHeaders );
 }
 
 public void setResponseMatch( String s ) {
@@ -329,30 +344,46 @@
if( expectHeaders != null ) {
// Check if we got the expected headers
if(headers==null) {
-   System.out.println(ERROR no response header, expecting header);
+System.out.println(ERROR no response header, expecting header);
}
Enumeration e=expectHeaders.keys();
while( e.hasMoreElements()) {
-   String key=(String)e.nextElement();
-   String value=(String)expectHeaders.get(key);
-   String respValue=(String)headers.get(key);
-   if( respValue==null || respValue.indexOf( value ) 0 ) {
-   System.out.println(ERROR expecting header  + key + : +
-  value +  GOT:  + respValue+  HEADERS( + 
headers + ));
-   if ( resultOut != null )
-   {
-   expectedString = expectedHeader + key + :+ value 
+ /expectedHeader\n;
-   actualString = actualHeader+ key + : + respValue 
+ /actualHeader\n;
-   resultOut.write(expectedString.getBytes() );
-   resultOut.write(actualString.getBytes() );
+String key=(String)e.nextElement();
+String value=(String)expectHeaders.get(key);
+String respValue=(String)headers.get(key);
+if( respValue==null || respValue.indexOf( value ) 0 ) {
+System.out.println(ERROR expecting header  + key + : +
+   value +  GOT:  + respValue+  HEADERS( + 
+headers + ));
+if ( resultOut != null )
+{
+expectedString = expectedHeader + key + :+ value + 
+/expectedHeader\n;
+actualString = actualHeader+ key + : + respValue + 
+/actualHeader\n;
+resultOut.write(expectedString.getBytes() );
+resultOut.write(actualString.getBytes() );

-   }
+}

-   return false;
-   }
+return false;
+}
}
-
}
+
+// check to see if any unexpected headers we're recieved
+if ( unexpectedHeaders != null ) {
+if ( headers != null ) {
+Enumeration e = unexpectedHeaders.keys();
+while( e.hasMoreElements() ) {
+String key = (String) e.nextElement();
+String value = (String) unexpectedHeaders.get( key );
+String respValue = (String) headers.get( key );
+if ( respValue != null  respValue.indexOf( value )  0 ) {
+System.out.println( ERROR Unexpected header:  + key + : + 
+value +
+   

Re: Performance of tomcat 3.2.3

2001-11-16 Thread Ryan Lubke

http://jakarta.apache.org/jmeter/index.html

On Fri, 2001-11-16 at 12:16, Michael Jennings wrote:
 Hi everyone,
 
 I'm working on a project for a client that involves a servlet engine component. I 
suggested tomcat
 since I am most familiar with it and it seems the most compliant servlet engine 
around.
 My client has mentioned concerns about tomcat's performance and now is insisting on
 using IBM websphere 4.0
 
 My suspicion is that tomcat's performance will be fine for this application, but I 
would
 like to have some hard numbers to back up my claim. Does anyone know of any kind
 of tool or code out there that can measure http and https performance?
 
 Thanks in advance.
 -Mike Jennings



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




[PATCH] Status-Code not set for Error pages when Exception is thrown

2001-11-16 Thread Ryan Lubke

Hi,

Say a user has a custom error page for status codes of 500
when an uncaught exception occurs.  The request parameter,
javax.servlet.error.status_code, is not set, so if the
error page tries to access this req. parameter, null will
be returned. 

Attached is a patch that I've tested in my env and seems
to do the trick.

-rl






Index: ErrorDispatcherValve.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorDispatcherValve.java,v
retrieving revision 1.6
diff -u -r1.6 ErrorDispatcherValve.java
--- ErrorDispatcherValve.java   2001/11/13 00:42:24 1.6
+++ ErrorDispatcherValve.java   2001/11/16 23:56:55
@@ -229,6 +229,8 @@
 response.setAppCommitted(false);
 ServletRequest sreq = request.getRequest();
 ServletResponse sresp = response.getResponse();
+sreq.setAttribute(Globals.STATUS_CODE_ATTR,
+  new 
+Integer(HttpServletResponse.SC_INTERNAL_SERVER_ERROR));
 sreq.setAttribute(Globals.ERROR_MESSAGE_ATTR,
   throwable.getMessage());
 sreq.setAttribute(Globals.EXCEPTION_ATTR,



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


Re: [VOTE] New commiter Ryan Bloom

2001-09-10 Thread Ryan Bloom

On Monday 10 September 2001 10:23, Christopher Cain wrote:

Thanks for the vote of confidence everybody.  I wasn't expecting 
such a fast turn-around time on this.  I'll try not to muck things
up too badly.

Ryan

 +1

 Welcome, Slick!

 - Christopher

 /**
   * Pleurez, pleurez, mes yeux, et fondez vous en eau!
   * La moitié de ma vie a mis l'autre au tombeau.
   *---Corneille
   */

 GOMEZ Henri wrote:
  I would like to propose Ryan Bloom as commiter
  in Tomcat, and particulary on jakarta-tomcat-connector.
 
  Ryan is one of the dev leader in Apache 2.0 and
  contributed many patch for both mod_jk and mod_webapp,
  showing us that connectors avoid politics :)
 
  Vote, please
 
  -
  Henri Gomez ___[_]
  EMAIL : [EMAIL PROTECTED](. .)
  PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
  PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6

-- 

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: [VOTE] Removal of mod_jk for Apache 2.0 from jakarta-tomcat f or Tomcat 3.3

2001-09-10 Thread Ryan Bloom

On Monday 10 September 2001 14:05, Pier Fumagalli wrote:
 [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  On Mon, 10 Sep 2001, Pier Fumagalli wrote:
  GOMEZ Henri [EMAIL PROTECTED] wrote:
  Ryan to became more than just a contributer :
 
  This is the third time we agree on something in less than 24 hours. This
  implies that either I'm getting old, or just plain silly...
 
  Now, if you could agree on merging mod_webapp and mod_jk, that would be
  something...

 Slowww down... :) If mod_jk wants to start using APR, I believe we're
 talking, otherwise, I'm done with cross-platform porting, I live it to Ryan

Oh no you don't.  I did the cross-platform stuff.  I wrote APR to get awar from it.

Ryan
__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: [VOTE] Removal of mod_jk for Apache 2.0 from jakarta-tomcat f or Tomcat 3.3

2001-09-10 Thread Ryan Bloom

On Monday 10 September 2001 14:51, [EMAIL PROTECTED] wrote:
 On Mon, 10 Sep 2001, Pier Fumagalli wrote:
   This is the third time we agree on something in less than 24 hours.
   This implies that either I'm getting old, or just plain silly...
  
   Now, if you could agree on merging mod_webapp and mod_jk, that would be
   something...
 
  Slowww down... :) If mod_jk wants to start using APR, I believe we're
  talking, otherwise, I'm done with cross-platform porting, I live it to
  Ryan
 
  :)

 Mod_jk will use APR - that's certain. The only question is when and how
 to do the transition without affecting the stability of the code. Having
 an APR1.0 out is one of the requirements - I don't think we can release
 mod_jk, even from j-t-c, with dependencies on un-released library.

 There are already 2 proposals for how to do that - one with preserving the
 current common as a temporary solution, until we make sure it works with
 IIS/NES, and the other with removing the common utils and hoping things
 will work with IIS/NES.

 Right now the APR/common is not the main itch - it'll become pretty soon,
 at least for me ( I need mmap for the new connector )

I'm actually right now working on the thread locks for Windows, and then I
am going to start agitating for an APR release.  We should have APR 1.0 out
the door soon-ish.  I am hoping to have it released sometime in the next month
or two.  :-)

Ryan

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: [VOTE] Removal of mod_jk for Apache 2.0 from jakarta-tomcat f or Tomcat 3.3

2001-09-10 Thread Ryan Bloom

On Monday 10 September 2001 15:22, Pier Fumagalli wrote:
 Ryan Bloom [EMAIL PROTECTED] wrote:
  MMAP is the other scary stuff in APR, the new code (without Ralph's
  libmm) it no more than one month old... I need it for load balancing,
  but I want to double check with the guys in CA next week and see what
  they tell me before publishing anything..
 
  Actually, MMAP has been in APR for a long time, it is just shared memory
  that is new.

 My bad... :)

  And, the shared memory code has been stressed in Apache for the
  last month.  Also the shared memory code  is basically just the important
  stuff from the MM library.

 My last status was 2 weeks ago when I last saw David, and he said wait for
 a little longer still... So, can I assume that little longer is over?

I think so.  The problem back then, was that he needed APR to be available before
he could do anything with apr-util, but we were cleaning APR before trying to 
clean apr-util, and it just didn't work.  That was a BeOS-only problem though.

Ryan
__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: [VOTE] Removal of mod_jk for Apache 2.0 from jakarta-tomcat f or Tomcat 3.3

2001-09-10 Thread Ryan Bloom

On Monday 10 September 2001 16:15, Christopher Cain wrote:
 Gomez Henri wrote:

 [snip]

  PS: Something goes crasy these days, on tomcat list, what do you think
  about this Pier (known as my worst enemy :)

 Something is indeed a little bizarre on the list today, mon ami. Maybe
 because Craig isn't here to keep us in line =)

 a) There are now four key people seriously discussing a partial merge of
 mod_jk and mod_webapp

 b) Henri and Pier are agreeing on all sorts of things

 c) The 3.3 guys are congratulating the 4.0 guys and vice-versa

 d) There have been about 15 votes in last 24 hours

 e) _I'm_ the short-tempered one, for a change

 The only reason I know for sure that the world is still spinning is that
 Jon is still vetoing things ;-)

Well, I'm new to the list, but I like to veto things too.  Somebody point me at
something I can veto...  :-)

Ryan
__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 mod_w ebapp.c

2001-09-07 Thread Ryan Bloom

On Thursday 06 September 2001 18:06, Justin Erenkrantz wrote:
 On Fri, Sep 07, 2001 at 01:52:50AM +0100, Pier Fumagalli wrote:
  Since there is no official release of httpd-2.0, I am confident that
  nobody will actually care unless they're testing something... And by
  testing good practice says get the HEAD of CVS and try it out yourself
  if it doesn't work. Development happens on head and if someone forks
  off for a little while to do some porting to some weird operating
  systems, at the end those changes will have to be integrated with HEAD,
  so, there's no point in sticking with backward compatibility AT THIS
  POINT.

 +1 to what Pier said.  (Ryan may chip in here too...)

 If you are using anything other than HEAD for httpd-2.0, I don't
 care much about any bug reports you may have.  The odds are that it'd
 either be fixed or broken in a different manner.  =)  -- justin

Don't try to mainain backwards compat in 2.0.  We aren't even trying yet.
Every release of 2.0 other than head has a serious problem, either a 
memory leek, or a security hole, or it can crash the machine.

IF your not using HEAD of httpd-2.0, you have a problem.  :-)

Ryan

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



[PATCH] only parse workers.properties once

2001-09-06 Thread Ryan Bloom


This is an improvement for mod_jk, to only parse workers.properties once
on platforms that use fork().  Most platforms will not require us to read
the workers.properties file in the child process, because they process it in
the parent.  Windows is the only platform I know of today that does require
us to read it twice.

This also has the advantage, that the workers.properties file does not need
to be readable by the user that the web server is running as.

Ryan

Index: mod_jk.c
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.23
diff -u -d -b -w -u -r1.23 mod_jk.c
--- mod_jk.c2001/09/06 17:00:54 1.23
+++ mod_jk.c2001/09/06 21:54:01
@@ -1214,6 +1214,7 @@
 return overrides;
 }
 
+#ifdef WIN32
 /** Standard apache callback, initialize jk.
  */
 static void jk_child_init(apr_pool_t *pconf, 
@@ -1224,6 +1225,7 @@
 
 init_jk( pconf, conf, s );
 }
+#endif
 
 /** Initialize jk, using worker.properties. 
 We also use apache commands ( JkWorker, etc), but this use is 
@@ -1340,7 +1342,9 @@
 {
 ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
 ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
+#ifdef WIN32
 ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
+#endif
 ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
 #if (MODULE_MAGIC_NUMBER_MAJOR  20010808)
 ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);


__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: Build system for mod_webapp and Apache 2.0

2001-09-05 Thread Ryan Bloom

On Wednesday 05 September 2001 04:13, jean-frederic clere wrote:

If you don't remove the --disable-shared, then libtool 1.4 can't compile 
mod_webapp as a dynamic library.  It really sucks, but complain to the 
libtool developers.  That flg must go, or we break anybody who tries to use
the latest version of libtool.  :-(

Ryan

 Hi,

 I have committed it. Note that the --disable-shared MUST NOT be removed
 otherwise libtool uses the dynamic libraries and we want it to use the
 static ones.

 Cheers

 Jean-frederic

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: Build system for mod_webapp and Apache 2.0

2001-09-05 Thread Ryan Bloom

On Wednesday 05 September 2001 09:57, jean-frederic clere wrote:
 Ryan Bloom wrote:
  On Wednesday 05 September 2001 04:13, jean-frederic clere wrote:
 
  If you don't remove the --disable-shared, then libtool 1.4 can't compile
  mod_webapp as a dynamic library.

 I just want a DSO file...

 - On my Linux if I remove the --disable-shared to the APR, libtool
 complains when building mod_webapp.so:
   something like that we use dynamic library we have to install them...
 (That is libtool 1.3.5)

 Are you suggesting to use dynamic libapr and libwebapp?

I don't really have a good suggestion.  I am just telling you that with
--disable-shared, libtool 1.4 CAN NOT create DSOs.  It sucks, but
that is libtool for ya.

It sounds like we may have to figure out which version of libtool the user has,
and adjust our build rules appropriately.  :-(

Ryan

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Patch for mod_jk and Apache 2.0

2001-09-05 Thread Ryan Bloom


This patch allows mod_jk to successfully serve pages against Apache 2.0
and Tomcat 4.0.  This is required after the changes to abstract out location
and directory walks from the core request processing.  This was created by
Will Rowe and myself.

Ryan

Index: mod_jk.c
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
retrieving revision 1.18
diff -u -d -b -w -u -r1.18 mod_jk.c
--- mod_jk.c2001/09/04 10:57:03 1.18
+++ mod_jk.c2001/09/06 00:17:28
@@ -1333,13 +1333,22 @@
 return DECLINED;
 }
 
+static int jk_map_to_storage(request_rec *r)
+{
+if (apr_table_get(r-notes, JK_WORKER_ID)) {
+r-filename = apr_filename_of_pathname(r-uri);
+return OK;
+}
+return DECLINED;
+}
+
 static void jk_register_hooks(apr_pool_t *p)
 {
 ap_hook_handler(jk_handler, NULL, NULL, APR_HOOK_MIDDLE);
 ap_hook_post_config(jk_post_config,NULL,NULL,APR_HOOK_MIDDLE);
 ap_hook_child_init(jk_child_init,NULL,NULL,APR_HOOK_MIDDLE);
 ap_hook_translate_name(jk_translate,NULL,NULL,APR_HOOK_FIRST);
-
+ap_hook_map_to_storage(jk_map_to_storage, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
 module AP_MODULE_DECLARE_DATA jk_module =


__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: cvs commit: jakarta-tomcat-connectors/webapp/apache-2.0 Makefile.in

2001-08-31 Thread Ryan Bloom

On Friday 31 August 2001 10:32, Pier Fumagalli wrote:
 [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  jfclere 01/08/29 07:29:29
 
  Modified:webapp   configure.in
  Added:   webapp/apache-2.0 Makefile.in
  Log:
  Copy/add configure logic for Apache-2.0 from mod_jk.
 
  Revision  ChangesPath
  1.23  +12 -3 jakarta-tomcat-connectors/webapp/configure.in

 APXS is broken in Apache 2.0... We should rely on APRVARS...

I actually fixed APXS this last weekend, and I have used it many times
now to build mod_webapp.   :-)

Ryan

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: Build system for mod_webapp and Apache 2.0

2001-08-31 Thread Ryan Bloom

On Friday 31 August 2001 10:36, Pier Fumagalli wrote:
  +TARGET=${SRCDIR}/apache-2.0
  +makefile=apache-2.0/Makefile
  +AC_MSG_RESULT([setting target module to... ${TARGET}])
  +  ]
  +)
  +AC_SUBST(TARGET)
  +
  +dnl

 Wasn't APXS for 2.0 completely broken? That's what you said last time :)

It was.  I fixed it.  :)

  LOCAL_HEADER([Configuring APR])
  LOCAL_FILTEREXEC(
  -  [./configure --enable-static --disable-shared --disable-threads],
  +  [./configure --enable-static --disable-threads],
   [APR configure])
  if ${TEST} ${ret} -ne 0
  then

 Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
 building our local copy with Apache 2.0... (I'll see what I can figure out,
 hoping that 2.0 works on my OS/X box :)

Oh, if that's what you want to do, I can make that happen.  Give me five minutes,
and you'll have a patch.  :-)

Ryan
__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: Build system for mod_webapp and Apache 2.0

2001-08-31 Thread Ryan Bloom

   LOCAL_HEADER([Configuring APR])
   LOCAL_FILTEREXEC(
   -  [./configure --enable-static --disable-shared --disable-threads],
   +  [./configure --enable-static --disable-threads],
[APR configure])
   if ${TEST} ${ret} -ne 0
   then
 
  Hmm... I'd like to rely on the APR code coming with Apache 2.0 instead of
  building our local copy with Apache 2.0... (I'll see what I can figure
  out, hoping that 2.0 works on my OS/X box :)

 Oh, if that's what you want to do, I can make that happen.  Give me five
 minutes, and you'll have a patch.  :-)

Sorry, I got called into a meeting, so this took a little bit longer than I wanted it
to.  Here is a patch that stops us from building APR, and we just use the one
from Apache 2.0.

Index: Makefile.in
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
retrieving revision 1.16
diff -u -d -b -w -u -r1.16 Makefile.in
--- Makefile.in 2001/08/31 10:26:24 1.16
+++ Makefile.in 2001/08/31 20:36:29
@@ -70,11 +70,11 @@
config.log \
config.status
 
-all: apr-all local-all
+all: @APR_BUILD@ local-all
 
 install: local-install
 
-clean: apr-clean local-clean
+clean: @APR_CLEAN@ local-clean
 
 distclean: clean
@$(ECHO) 
Index: configure.in
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
retrieving revision 1.24
diff -u -d -b -w -u -r1.24 configure.in
--- configure.in2001/08/31 10:26:24 1.24
+++ configure.in2001/08/31 20:36:29
@@ -210,15 +210,21 @@
 APA=`${GREP} STANDARD20 ${APXS}`
 if  ${TEST} -z $APA ; then
   TARGET=${SRCDIR}/apache-1.3
+  APR_BUILD=apr-all
+  APR_CLEAN=apr-clean
   makefile=apache-1.3/Makefile
 else
   TARGET=${SRCDIR}/apache-2.0
+  APR_BUILD=
+  APR_CLEAN=
   makefile=apache-2.0/Makefile
 fi
 AC_MSG_RESULT([setting target module to... ${TARGET}])
   ]
 )
 AC_SUBST(TARGET)
+AC_SUBST(APR_BUILD)
+AC_SUBST(APR_CLEAN)
 
 dnl --
 dnl Process the --with-apr=... command line argument
@@ -226,10 +232,16 @@
 AC_MSG_CHECKING([APR directory])
 AC_ARG_WITH(apr,
   [  --with-apr=DIR  where the APR sources can be found.],
-  APRDIR=${withval},
-  APRDIR=${SRCDIR}/apr
+  APRDIR=${withval}
 )
 
+if ${TEST} -z ${APA} -a -z ${APRDIR} ; then
+  APRDIR={SRCDIR}/apr
+else
+  APRDIR=${APXS_PREFIX}
+fi
+
+if ${TEST} -z ${APA} ; then
 if ${TEST} ! -d ${APRDIR} ; then
   AC_MSG_ERROR([Cannot find APR sources directory \${APRDIR}\])
 fi
@@ -267,6 +279,9 @@
   AC_MSG_ERROR([APR configure script terminated with error code ${ret}])
 fi
 cd ${curdir}
+else
+  AC_MSG_RESULT(Using APR from Apache build)
+fi
 
 dnl --
 dnl Retrieving APR default values
@@ -275,19 +290,29 @@
 
 if ${TEST} ! -f ${APRDIR}/APRVARS
 then
+  if ${TEST} ${APA} ; then
+LIBDIR=/lib
+  else
   AC_MSG_RESULT([error])
   AC_MSG_ERROR([Cannot find APR defaults in ${APRDIR}/APRVARS])
 fi
+else
+  LIBDIR=
+fi
 
 if ${TEST} ! -x ${APRDIR}/libtool
 then
+  if ${TEST} ${APA} ; then
+LIBTOOL=${APXS_PREFIX}/build/libtool
+  else
   AC_MSG_RESULT([error])
   AC_MSG_ERROR([Cannot find APR libtool binary])
+  fi
 else
   LIBTOOL=${APRDIR}/libtool
 fi
 
-eval `cat ${APRDIR}/APRVARS`
+eval `cat ${APRDIR}${LIBDIR}/APRVARS`
 AC_SUBST(CC)
 AC_SUBST(CPP)
 AC_SUBST(SHELL)

__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Re: Build system for mod_webapp and Apache 2.0

2001-08-30 Thread Ryan Bloom

On Thursday 30 August 2001 01:10, jean-frederic clere wrote:
 Ryan Bloom wrote:
  Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
  I have been pretty active on httpd 2.0.  I decided to port mod_webapp
  last week, and Pier committed the code for me, but the build system isn't
  there, so I am posting the build system now.
 
  This is currently working, although there seems to be some strangeness
  when Tomcat responds to mod_webapp.  I'll be looking into that over the
  next few days. I hope to be more active as time permits.  :-)
 
  The Makefile.in should be placed in
  jakarta-tomcat-connectors/webapp/apache-2.0

 Hi Ryan,

 I committed some code some hours before... I will try to merge the two.
 I am detecting  Apache version using apxs thru the following code:
 +++
 dnl test apache version (from mod_jk)
 $RM -rf test
 $APXS -n test -g
 APA=`grep STANDARD20 test/mod_test.c`
 if  ${TEST} -z $APA ; then
   TARGET=${SRCDIR}/apache-1.3
   makefile=apache-1.3/Makefile
 else
   TARGET=${SRCDIR}/apache-2.0
   makefile=apache-2.0/Makefile
 fi
 +++
 Any comment? - I am using the same in mod_jk -

Doesn't this needlessly create a new directory on the machine?  And, it doesn't
clean that dir until the next time you try to configure.  At the very least,
we should execute the '$RM -rf test' command after the grep.  It would actually
be possible to just do 'grep STANDARD20 $APXS'.  This is because
the perl script actually has a copy of the module in it.  That is probably the
cleanest solution.

 I have also noted strange things mod_webapp always returns 500.
 It seems the request is mapped (wam_match) correctly but the handler
 (wam_invoke) is not called.
 What is the problem you have detected?

It looks like when Tomcat returns a 302 through mod_webapp, we are
redirected to a strange port.  I haven't even begun to look at it yet, but I
am hoping to have time either today or tomorrow.

Ryan
__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--



Build system for mod_webapp and Apache 2.0

2001-08-29 Thread Ryan Bloom


Hi everybody,  I'm new to the list, but for anybody who doesn't know me,
I have been pretty active on httpd 2.0.  I decided to port mod_webapp last
week, and Pier committed the code for me, but the build system isn't there, so
I am posting the build system now.

This is currently working, although there seems to be some strangeness when
Tomcat responds to mod_webapp.  I'll be looking into that over the next few days.
I hope to be more active as time permits.  :-)

The Makefile.in should be placed in jakarta-tomcat-connectors/webapp/apache-2.0

Thanks,

Ryan

Index: webapp/Makefile.in
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/Makefile.in,v
retrieving revision 1.15
diff -u -d -b -w -u -r1.15 Makefile.in
--- webapp/Makefile.in  2001/08/06 22:21:52 1.15
+++ webapp/Makefile.in  2001/08/29 23:51:41
@@ -62,6 +62,7 @@
 
 LOCALDIRS = @TGTDIRS@ @TARGET@
 APRDIR = @APRDIR@
+INSTALLDIR = @TARGET@
 
 CFGS = @CONFIGFILES@ \
@SRCDIR@/lib/pr_warp_defs.h \
@@ -71,6 +72,8 @@
 
 all: apr-all local-all
 
+install: local-install
+
 clean: apr-clean local-clean
 
 distclean: clean
@@ -128,6 +131,19 @@
$(ECHO) Cleaning up $${DIR}... ; \
cd $${DIR} ; \
$(MAKE) clean ; \
+   RET=$$? ; \
+   cd $(SRCDIR) ; \
+   if test $${RET} != 0 ; then \
+   exit $${RET} ; \
+   fi ; \
+   done
+
+local-install:
+   @for DIR in $(INSTALLDIR) ; do \
+   $(ECHO)  ; \
+   $(ECHO) Compiling sources in $${DIR}... ; \
+   cd $${DIR} ; \
+   $(MAKE) install ; \
RET=$$? ; \
cd $(SRCDIR) ; \
if test $${RET} != 0 ; then \
Index: webapp/configure.in
===
RCS file: /home/cvspublic/jakarta-tomcat-connectors/webapp/configure.in,v
retrieving revision 1.22
diff -u -d -b -w -u -r1.22 configure.in
--- webapp/configure.in 2001/08/06 22:48:45 1.22
+++ webapp/configure.in 2001/08/29 23:51:41
@@ -214,6 +214,41 @@
 AC_SUBST(TARGET)
 
 dnl --
+dnl Process the --with-apxs2[=FILE] command line argument
+dnl --
+AC_ARG_WITH(apxs2,
+  [  --with-apxs2[=FILE]  build a shared Apache 2.0.x module.],
+  [
+if ${TEST} -n ${TARGET}
+then
+  AC_MSG_ERROR([target already defined as ${TARGET}])
+fi
+
+APXS=${withval}
+
+if ${TEST} -z ${APXS} ; then APXS=yes ; fi
+if ${TEST} ${APXS} = yes
+then
+  AC_PATH_PROG(APXS,apxs,${PATH})
+fi
+
+AC_MSG_CHECKING([if apxs is working])
+${APXS} -q CC 21 1/dev/null
+if ${TEST} ! $? -eq 0
+then
+  AC_MSG_RESULT([no])
+  AC_MSG_ERROR([apxs is unworkable])
+fi
+AC_MSG_RESULT([ok])
+
+TARGET=${SRCDIR}/apache-2.0
+makefile=apache-2.0/Makefile
+AC_MSG_RESULT([setting target module to... ${TARGET}])
+  ]
+)
+AC_SUBST(TARGET)
+
+dnl --
 dnl Process the --with-apr=... command line argument
 dnl --
 AC_MSG_CHECKING([APR directory])
@@ -253,7 +288,7 @@
 
 LOCAL_HEADER([Configuring APR])
 LOCAL_FILTEREXEC(
-  [./configure --enable-static --disable-shared --disable-threads],
+  [./configure --enable-static --disable-threads],
   [APR configure])
 if ${TEST} ${ret} -ne 0
 then


__
Ryan Bloom  [EMAIL PROTECTED]
Covalent Technologies   [EMAIL PROTECTED]
--


# = #
#   #
# The Apache Software License,  Version 1.1 #
#   #
#  Copyright (c) 1999-2001 The Apache Software Foundation.  #
#   All rights reserved.#
#   #
# = #
#   #
# Redistribution and use in source and binary forms,  with or without modi- #
# fication, are permitted provided that the following conditions are met:   #
#   #
# 1. Redistributions of source code  must retain the above copyright notice #
#notice, this list of conditions and the following disclaimer

submitting a patch

2001-05-17 Thread Ryan Smith

I have found a bug and fixed it in the Tomcat NT
service program. How do I submit it? Do you guys take
bug fixes from independent people. I had heard from
several people that they had submitted bug fixes and
you guys told them to f*** off (not necessarily in
those terms).

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/