DO NOT REPLY [Bug 6998] New: - java code generated by jspc can't be compiled

2002-03-09 Thread bugzilla

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

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

java code generated by jspc can't be compiled

   Summary: java code generated by jspc can't be compiled
   Product: Tomcat 4
   Version: 4.0.4 Beta 1
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have a rather large jsp page which compiles fine if I use the weblogic jsp 
compiler, but I can't compile the java code that's generated by the jasper jsp 
compiler.

When I compile the java code generated by jasper for this specific jsp page I 
get the following errors :

[javac] 
C:\DIGO\DINA\Ontwikkeling\Build\src\jsp_servlet\PerceelGunning.java:10213: code 
too large for try statement
[javac]   try {
[javac]   ^
[javac] 
C:\DIGO\DINA\Ontwikkeling\Build\src\jsp_servlet\PerceelGunning.java:10251: code 
too large for try statement
[javac]   try {
[javac]   ^
[javac] 

...

We only get these errors for one jsp page, which also happens to be our largest 
jsp page.  The jsp itself is 71 Kb and the java code for the jsp is 663 Kb (and 
about 11000 lines).

I can send you the jsp page and the generated java code (from both the weblogic 
jsp compiler and the Jasper jsp compiler) if you like.

Just let me know if you need more information.

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




DO NOT REPLY [Bug 6998] - java code generated by jspc can't be compiled

2002-03-09 Thread bugzilla

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

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

java code generated by jspc can't be compiled





--- Additional Comments From [EMAIL PROTECTED]  2002-03-09 14:25 ---
Created an attachment (id=1325)
jsp page of which the generated java code can't be compiled

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




DO NOT REPLY [Bug 6998] - java code generated by jspc can't be compiled

2002-03-09 Thread bugzilla

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

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

java code generated by jspc can't be compiled





--- Additional Comments From [EMAIL PROTECTED]  2002-03-09 14:33 ---
Created an attachment (id=1326)
java code generated by jasper jsp compiler

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




DO NOT REPLY [Bug 6058] - Generated java files not in a correct package

2002-03-09 Thread bugzilla

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

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

Generated java files not in a correct package





--- Additional Comments From [EMAIL PROTECTED]  2002-03-09 16:14 ---
Proposed changes to implement this enhancement :


changes to 3 classes in the jasper source.


1- JasperLoader.java
 
loadClass(string,boolean) method:
 
i changed this:
 
 // Only load classes for this JSP page
 if( name.startsWith(Constants.JSP_PACKAGE_NAME + . + className) ) {
 String classFile = name.substring(Constants.JSP_PACKAGE_NAME.length()+1) +
  .class;
 byte [] cdata = loadClassDataFromFile(classFile);
 
into this:
 
 // Only load classes for this JSP page
 if( name.startsWith(Constants.JSP_PACKAGE_NAME)) {
 byte [] cdata = loadClassDataFromFile(className +.class);

so the test if it is a jsp page is only about the standaard jsp package name
but that should be good enough for everything.
besides that i use the internal classname (which is the real classname without
package or .class)
instead of computing it again. I really don't know why they do that because the
real class name
is given with the constructor of JasperLoader..
 
 
2- JspServlet.java
 
the loadJSP method:
 
changed this:
 
   if( outURI.endsWith(/) )
outURI = outURI + jspUri.substring(1,jspUri.lastIndexOf(/)+1);
else
outURI = outURI + jspUri.substring(0,jspUri.lastIndexOf(/)+1);;
outURL = new URL(outURI);
 
into this:
 
   if( outURI.endsWith(/) )
outURI = outURI + jspUri.substring(1,jspUri.lastIndexOf(/)+1);
else
outURI = outURI + jspUri.substring(0,jspUri.lastIndexOf(/)+1);;
 
StringBuffer sb = new StringBuffer(outURI.length());
  StringTokenizer st = new StringTokenizer(outURI,  );
  while(st.hasMoreTokens())
  {
   sb.append(st.nextToken());
  }
 outURI = sb.toString();
 
outURL = new URL(outURI);
 
for removing the spaces out of the output dir (so it is equal to the classpath,
see below)
 
 
and this
 
  jsw.servletClass = jsw.loader.loadClass(
   Constants.JSP_PACKAGE_NAME + . + ctxt.getServletClassName());
 
into this
 
  jsw.servletClass = jsw.loader.loadClass(ctxt.getServletPackageName() + . +
ctxt.getServletClassName());
 
This should be default anyway because the ctxt (context class) is defining
everything so it should
also be used here. Default it will say: Constants.JSP_PACKAGE_NAME.
 
 
3- JspEngineContext.java
 
This added to the constructor:
 
jspFile = jspFile.replace('\\', '/');
int index = jspFile.lastIndexOf('/');
if(index  0)
{
String sPackageEnd = jspFile.substring(0, index);
  sPackageEnd = sPackageEnd.replace('/', '.');
  StringBuffer sb = new StringBuffer(sPackageEnd.length());
  
  if(!sPackageEnd.startsWith(.)) sb.append(.);
  // filter out spaces
  StringTokenizer st = new StringTokenizer(sPackageEnd,  );
  while(st.hasMoreTokens())
  {
   sb.append(st.nextToken());
  }
  this.servletPackageName += sb.toString();
}
 
so the servletPackageName wil be the default one + the subdirs where it is in.
(i remove the spaces, any idee's what are more allowed in dirs but not in packages?)

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




DO NOT REPLY [Bug 6999] New: - javax.sql.DataSource.getConnection() causes java.sql.SQLException: Can't call commit when autocommit=true

2002-03-09 Thread bugzilla

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

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

javax.sql.DataSource.getConnection() causes java.sql.SQLException: Can't call commit 
when autocommit=true 

   Summary: javax.sql.DataSource.getConnection() causes
java.sql.SQLException: Can't call commit when
autocommit=true
   Product: Tomcat 4
   Version: 4.0.4 Beta 1
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


When requesting localhost:8080/examples/jsp/db/list.jsp and consequent
instantiation 
of db.ConnectionBean and during getConnection() from java.sql.DataSource 
I get the following exception:
javax.servlet.ServletException: class db.ConnectionBean : java.sql.SQLException:
Can't call commit when autocommit=true
(stack trace is at the bottom of this text).

Database is MySQL--3.23.49a
JDBC driver is mm.mysql-2.0.8-bin.jar
Tyrex: tyrex-0.9.7.0.jar
JDK 1.4

With the stuff above Tomcat 4.0.1 works (besides the real connection pooling is
not provided).

With this release of Tomcat I debugged the Tyrex code and found out that it
attempts 
to do commit() during DataSource.getConnection().

Related piece of server.xml:

 Resource name=lev/DataSource auth=Container
type=javax.sql.DataSource/
  ResourceParams name=lev/DataSource 
 parameternameuser/namevaluewv/value/parameter
parameternamepassword/namevaluewv/value/parameter
parameternamedriverClassName/name
  valueorg.gjt.mm.mysql.Driver/value/parameter 
parameternamedriverName/name
  valuejdbc:mysql://localhost:3306/WV/value/parameter 
  /ResourceParams

Releated fragment of $CATALINA_HOME/webapps/examples/WEB-INF/web.xml:

resource-ref
  res-ref-namelev/DataSource/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  res-sharing-scopeShareable/res-sharing-scope
/resource-ref

Related fragment of list.jsp:

  %@ include file=/jsp/db/defs.jsp %
  %@ page import = db.ConnectionBean %
  %@ page import = base.* %
  %@ page import = java.lang.StrictMath %


  jsp:useBean id=db class=db.ConnectionBean scope=request/

Related piece of db.ConnectionBean:

   public class ConnectionBean extends base.BaseBean{

  ...
  public ConnectionBean() throws NamingException, MyException, SQLException
{
_baseIt++;
super.BaseBean();

super.openConnection();  // EXCEPTION IS THROWN FROM HERE
createTables();
  }
  ...
}

Related piece of base.BaseBean:

--- cut here --
package base;


import javax.servlet.http.*;
import java.util.*;
import java.io.*;
import javax.naming.NamingException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingEnumeration;
import javax.naming.Binding;
import javax.naming.directory.InitialDirContext;
import java.sql.*;
import javax.sql.*;
import base.DBTable;
import javazoom.upload.*;


import base.MyException;

public class BaseBean
{
private Hashtable _tables;
private DataSource _ds = null;
private String _dbkind = null;
protected Connection _con = null;

public void BaseBean() throws NamingException, MyException, SQLException
{   

_tables = new Hashtable();

Context ctx  = new InitialContext();
if (_ds == null)
  {
  envCtx = (Context)ctx.lookup(java:comp/env);
  _ds = (DataSource)envCtx.lookup(lev/DataSource);
  if (_ds == null)
throw new MyException(Bad data source);

  }

}

protected void finalize() throws SQLException
{ 
java.util.Date d = new java.util.Date(System.currentTimeMillis());
System.err.println(finalize at  + d);
if (_con != null) _con.close(); 
}

public void  openConnection() throws SQLException, MyException 
{
if (_con == null)
{
if (_ds == null)
throw new MyException(Bad datasource);
_con = _ds.getConnection();  // EXCEPTION IS THROWN FROM HERE !!!
if (_con == null)  
throw new MyException(Bad connection);
_dbkind = _con.getMetaData().getDatabaseProductName();
}

}

  // ...

}
-- cut here ---

I tried mm.mysql-2.0.11-bin.jar but with the same result.

Stack trace:
- cut here 

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 OutputBuffer.java

2002-03-09 Thread remm

remm02/03/09 09:39:28

  Modified:coyote/src/java/org/apache/coyote/tomcat4 OutputBuffer.java
  Log:
  - Fix WrappedForward05 test, caused by a fuzzy handling of the suspended
flag.
  - Cleanup.
  
  Revision  ChangesPath
  1.5   +127 -17   
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java
  
  Index: OutputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/OutputBuffer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- OutputBuffer.java 9 Mar 2002 00:15:40 -   1.4
  +++ OutputBuffer.java 9 Mar 2002 17:39:28 -   1.5
  @@ -88,7 +88,8 @@
   // -- Constants
   
   
  -public static final String DEFAULT_ENCODING=ISO-8859-1;
  +public static final String DEFAULT_ENCODING = 
  +org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
   public static final int DEFAULT_BUFFER_SIZE = 8*1024;
   static final int debug = 0;
   
  @@ -104,41 +105,96 @@
   // - Instance Variables
   
   
  -private int defaultBufferSize = DEFAULT_BUFFER_SIZE;
  -private int defaultCharBufferSize = DEFAULT_BUFFER_SIZE / 2 ;
  +/**
  + * The byte buffer.
  + */
  +private ByteChunk bb;
  +
  +
  +/**
  + * The chunk buffer.
  + */
  +private CharChunk cb;
  +
   
  +/**
  + * State of the output buffer.
  + */
   private int state = 0;
   
  -// statistics
  +
  +/**
  + * Number of bytes written.
  + */
   private int bytesWritten = 0;
  -private int charsWritten;
   
  +
  +/**
  + * Number of chars written.
  + */
  +private int charsWritten = 0;
  +
  +
  +/**
  + * Flag which indicates if the output buffer is closed.
  + */
   private boolean closed = false;
  -private boolean doFlush = false;
  +
   
   /**
  - * The buffer
  + * Do a flush on the next operation.
*/
  -private ByteChunk bb;
  -private CharChunk cb;
  +private boolean doFlush = false;
  +
   
   /**
* Byte chunk used to output bytes.
*/
   private ByteChunk outputChunk = new ByteChunk();
   
  +
  +/**
  + * Encoding to use.
  + */
   private String enc;
  +
  +
  +/**
  + * Encoder is set.
  + */
   private boolean gotEnc = false;
   
  +
  +/**
  + * List of encoders.
  + */
   protected Hashtable encoders = new Hashtable();
  +
  +
  +/**
  + * Current char to byte converter.
  + */
   protected C2BConverter conv;
   
  +
  +/**
  + * Associated Coyote response.
  + */
   private Response coyoteResponse;
   
  +
  +/**
  + * Suspended flag. All output bytes will be swallowed if this is true.
  + */
   private boolean suspended = false;
   
  +
  +/**
  + * True if the total response size can be computed.
  + */
   private boolean knownResponseSize = false;
   
  +
   // --- Constructors
   
   
  @@ -152,6 +208,11 @@
   }
   
   
  +/**
  + * Alternate constructor which allows specifying the initial buffer size.
  + * 
  + * @param size Buffer size to use
  + */
   public OutputBuffer(int size) {
   
   bb = new ByteChunk(size);
  @@ -169,6 +230,8 @@
   
   /**
* Associated Coyote response.
  + * 
  + * @param coyoteResponse Associated Coyote response
*/
   public void setResponse(Response coyoteResponse) {
this.coyoteResponse = coyoteResponse;
  @@ -177,6 +240,8 @@
   
   /**
* Get associated Coyote response.
  + * 
  + * @return the associated Coyote response
*/
   public Response getResponse() {
   return this.coyoteResponse;
  @@ -185,6 +250,8 @@
   
   /**
* Is the response output suspended ?
  + * 
  + * @return suspended flag value
*/
   public boolean isSuspended() {
   return this.suspended;
  @@ -193,6 +260,8 @@
   
   /**
* Set the suspended flag.
  + * 
  + * @param suspended New suspended flag value
*/
   public void setSuspended(boolean suspended) {
   this.suspended = suspended;
  @@ -231,9 +300,18 @@
   }
   
   
  +/**
  + * Close the output buffer. This tries to calculate the response size if 
  + * the response has not been committed yet.
  + * 
  + * @throws IOException An underlying IOException occurred
  + */
   public void close()
   throws IOException {
   
  +if (suspended)
  +return;
  +
   if (!coyoteResponse.isCommitted()) {
   knownResponseSize = true;
 

cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4 CoyoteProcessor.java

2002-03-09 Thread remm

remm02/03/09 09:40:01

  Modified:coyote/src/java/org/apache/coyote/tomcat4
CoyoteProcessor.java
  Log:
  - Set the socket in the request (used by the SSL authenticator).
  
  Revision  ChangesPath
  1.11  +5 -4  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java
  
  Index: CoyoteProcessor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CoyoteProcessor.java  9 Mar 2002 03:35:23 -   1.10
  +++ CoyoteProcessor.java  9 Mar 2002 17:40:01 -   1.11
  @@ -1,6 +1,6 @@
  -/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
 1.10 2002/03/09 03:35:23 remm Exp $
  - * $Revision: 1.10 $
  - * $Date: 2002/03/09 03:35:23 $
  +/* * $Header: 
/home/cvs/jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat4/CoyoteProcessor.java,v
 1.11 2002/03/09 17:40:01 remm Exp $
  + * $Revision: 1.11 $
  + * $Date: 2002/03/09 17:40:01 $
*
* 
*
  @@ -112,7 +112,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.10 $ $Date: 2002/03/09 03:35:23 $
  + * @version $Revision: 1.11 $ $Date: 2002/03/09 17:40:01 $
*/
   
   final class CoyoteProcessor
  @@ -373,6 +373,7 @@
   protected void postParseRequest(Request req)
   throws IOException {
   
  +request.setSocket(socket);
   request.setSecure(connector.getSecure());
   req.scheme().setString(connector.getScheme());
   
  
  
  

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




cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-09 Thread remm

remm02/03/09 10:54:28

  Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java
  Log:
  - Add a method allowing to create a header using a char buffer.
  
  Revision  ChangesPath
  1.3   +9 -0  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.java
  
  Index: MimeHeaders.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MimeHeaders.java  31 Dec 2001 18:20:05 -  1.2
  +++ MimeHeaders.java  9 Mar 2002 18:54:28 -   1.3
  @@ -288,6 +288,15 @@
return mhf.getValue();
   }
   
  +/** Create a new named header using translated char[].
  + */
  +public MessageBytes addValue(char c[], int startN, int endN)
  +{
  + MimeHeaderField mhf=createHeader();
  + mhf.getName().setChars(c, startN, endN);
  + return mhf.getValue();
  +}
  +
   /** Allow set operations - 
   return a MessageBytes container for the
header value ( existing header or new
  
  
  

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




cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java InternalInputBuffer.java

2002-03-09 Thread remm

remm02/03/09 11:05:35

  Modified:http11/src/java/org/apache/coyote/http11
Http11Processor.java InternalInputBuffer.java
  Log:
  - Port the tricks used by the old HTTP/1.1 connector to optimize handling
of the US-ASCII parts of the HTTP header (method + protocol + header names
+ URI in most cases).
  - Note: The handling of the URI is probably not very satisfactory, but until the
servlet container can handle a byte-based URL, there's no point in being fancy.
  
  Revision  ChangesPath
  1.6   +20 -0 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java
  
  Index: Http11Processor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Processor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Http11Processor.java  9 Mar 2002 05:20:03 -   1.5
  +++ Http11Processor.java  9 Mar 2002 19:05:35 -   1.6
  @@ -249,6 +249,26 @@
   
   
   /**
  + * Get the value of the internationalized URI flag.
  + * 
  + * @return the value of the internationalized URI flag
  + */
  +public boolean isInternationalizedURIAllowed() {
  +return inputBuffer.isInternationalizedURIAllowed();
  +}
  +
  +
  +/**
  + * Set the value of the internationalized URI flag.
  + * 
  + * @param flag New value of the internationalized URI flag
  + */
  +public void setInternationalizedURIAllowed(boolean flag) {
  +inputBuffer.setInternationalizedURIAllowed(flag);
  +}
  +
  +
  +/**
* Process pipelined HTTP requests using the specified input and output
* streams.
* 
  
  
  
  1.11  +71 -8 
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java
  
  Index: InternalInputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- InternalInputBuffer.java  9 Mar 2002 05:20:03 -   1.10
  +++ InternalInputBuffer.java  9 Mar 2002 19:05:35 -   1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.10 2002/03/09 05:20:03 remm Exp $
  - * $Revision: 1.10 $
  - * $Date: 2002/03/09 05:20:03 $
  + * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.11 2002/03/09 19:05:35 remm Exp $
  + * $Revision: 1.11 $
  + * $Date: 2002/03/09 19:05:35 $
*
* 
*
  @@ -112,6 +112,9 @@
   bodyBuffer = new byte[headerBufferSize];
   buf = headerBuffer1;
   
  +headerBuffer = new char[headerBufferSize];
  +ascbuf = headerBuffer;
  +
   inputStreamInputBuffer = new InputStreamInputBuffer();
   
   filterLibrary = new InputFilter[0];
  @@ -161,6 +164,12 @@
   
   
   /**
  + * Pointer to the US-ASCII header buffer.
  + */
  +protected char[] ascbuf;
  +
  +
  +/**
* Last valid byte.
*/
   protected int lastValid;
  @@ -191,6 +200,19 @@
   
   
   /**
  + * US-ASCII header buffer.
  + */
  +protected char[] headerBuffer;
  +
  +
  +/**
  + * Allow i18n URLs (non-standard URLs conatining non %xx encoded 
  + * bytes 127).
  + */
  +protected boolean internationalizedURIAllowed = false;
  +
  +
  +/**
* Underlying input stream.
*/
   protected InputStream inputStream;
  @@ -308,6 +330,28 @@
   }
   
   
  +/**
  + * Get the value of the internationalized URI flag.
  + * 
  + * @return the value of the internationalized URI flag
  + */
  +public boolean isInternationalizedURIAllowed() {
  +return (internationalizedURIAllowed);
  +}
  +
  +
  +/**
  + * Set the value of the internationalized URI flag.
  + * 
  + * @param internationalizedURIAllowed New value of the internationalized
  + * URI flag
  + */
  +public void setInternationalizedURIAllowed
  +(boolean internationalizedURIAllowed) {
  +this.internationalizedURIAllowed = internationalizedURIAllowed;
  +}
  +
  +
   // - Public Methods
   
   
  @@ -424,6 +468,7 @@
   
   //
   // Reading the method name
  +// Method name is always US-ASCII
   //
   
   boolean space = false;
  @@ -436,9 +481,11 @@
   throw new EOFException(sm.getString(iib.eof.error));
   }
   
  +

cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 InternalInputBuffer.java

2002-03-09 Thread remm

remm02/03/09 11:18:39

  Modified:http11/src/java/org/apache/coyote/http11
InternalInputBuffer.java
  Log:
  - Fix URI parsing problems.
  
  Revision  ChangesPath
  1.12  +5 -3  
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java
  
  Index: InternalInputBuffer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- InternalInputBuffer.java  9 Mar 2002 19:05:35 -   1.11
  +++ InternalInputBuffer.java  9 Mar 2002 19:18:39 -   1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.11 2002/03/09 19:05:35 remm Exp $
  - * $Revision: 1.11 $
  - * $Date: 2002/03/09 19:05:35 $
  + * $Header: 
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/InternalInputBuffer.java,v
 1.12 2002/03/09 19:18:39 remm Exp $
  + * $Revision: 1.12 $
  + * $Date: 2002/03/09 19:18:39 $
*
* 
*
  @@ -511,6 +511,8 @@
   if (!fill())
   throw new EOFException(sm.getString(iib.eof.error));
   }
  +
  +ascbuf[pos] = (char) buf[pos];
   
   if (buf[pos] == Constants.SP) {
   space = true;
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core NamingContextListener.java

2002-03-09 Thread remm

remm02/03/09 11:23:00

  Modified:catalina/src/share/org/apache/catalina/core
NamingContextListener.java
  Log:
  - Add support for the 'java.lang.Character' type in the ENC env entries.
Bug reported by James Cai.
  
  Revision  ChangesPath
  1.10  +12 -4 
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
  
  Index: NamingContextListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- NamingContextListener.java20 Feb 2002 01:18:55 -  1.9
  +++ NamingContextListener.java9 Mar 2002 19:23:00 -   1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.9 2002/02/20 01:18:55 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2002/02/20 01:18:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
 1.10 2002/03/09 19:23:00 remm Exp $
  + * $Revision: 1.10 $
  + * $Date: 2002/03/09 19:23:00 $
*
* 
*
  @@ -116,7 +116,7 @@
* with each context and server.
*
* @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2002/02/20 01:18:55 $
  + * @version $Revision: 1.10 $ $Date: 2002/03/09 19:23:00 $
*/
   
   public class NamingContextListener
  @@ -627,10 +627,18 @@
   value = Double.valueOf(env.getValue());
   } else if (type.equals(java.lang.Float)) {
   value = Float.valueOf(env.getValue());
  +} else if (type.equals(java.lang.Character)) {
  +if (env.getValue().length() == 1) {
  +value = new Character(env.getValue().charAt(0));
  +} else {
  +throw new IllegalArgumentException();
  +}
   } else {
   log(sm.getString(naming.invalidEnvEntryType, env.getName()));
   }
   } catch (NumberFormatException e) {
  +log(sm.getString(naming.invalidEnvEntryValue, env.getName()));
  +} catch (IllegalArgumentException e) {
   log(sm.getString(naming.invalidEnvEntryValue, env.getName()));
   }
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs/appdev build.xml.txt

2002-03-09 Thread craigmcc

craigmcc02/03/09 14:39:19

  Modified:webapps/tomcat-docs/appdev build.xml.txt
  Log:
  Add a list target for conveniently determining whether or not the app
  you are building has been installed yet or not.
  
  Make the reload target depend on compile, so that the typical development
  cycle becomes:
   - Modify files as required
   - ant reload
   - Test modified app
  
  Revision  ChangesPath
  1.6   +24 -2 jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt
  
  Index: build.xml.txt
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/appdev/build.xml.txt,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml.txt 14 Feb 2002 07:06:36 -  1.5
  +++ build.xml.txt 9 Mar 2002 22:39:19 -   1.6
  @@ -18,7 +18,7 @@
image files), including the WEB-INF subdirectory
and its configuration file contents.
   
  - $Id: build.xml.txt,v 1.5 2002/02/14 07:06:36 craigmcc Exp $
  + $Id: build.xml.txt,v 1.6 2002/03/09 22:39:19 craigmcc Exp $
   --
   
   
  @@ -144,6 +144,7 @@
   --
   
 taskdef name=install classname=org.apache.catalina.ant.InstallTask/
  +  taskdef name=listclassname=org.apache.catalina.ant.ListTask/
 taskdef name=reload  classname=org.apache.catalina.ant.ReloadTask/
 taskdef name=remove  classname=org.apache.catalina.ant.RemoveTask/
   
  @@ -390,6 +391,27 @@
   
   
   
  +!-- == List Target === --
  +
  +!--
  +
  +  The list target asks the specified Tomcat 4 installation to list the
  +  currently running web applications, either loaded at startup time or
  +  installed dynamically.  It is useful to determine whether or not the
  +  application you are currently developing has been installed.
  +
  +--
  +
  +  target name=list
  +   description=List installed applications on servlet container
  +
  +listurl=${manager.url}
  +username=${manager.username}
  +password=${manager.password}/
  +
  +  /target
  +
  +
   !--  Prepare Target == --
   
   !--
  @@ -439,7 +461,7 @@
   
   --
   
  -  target name=reload
  +  target name=reload depends=compile
  description=Reload application on servlet container
   
   reload url=${manager.url}
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources ResourceAttributes.java

2002-03-09 Thread remm

remm02/03/09 15:21:49

  Modified:catalina/src/share/org/apache/naming/resources
ResourceAttributes.java
  Log:
  - Add some hooks to allow the directory context implementation
to compute strong etags.
  
  Revision  ChangesPath
  1.5   +70 -5 
jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java
  
  Index: ResourceAttributes.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ResourceAttributes.java   28 Sep 2001 02:16:32 -  1.4
  +++ ResourceAttributes.java   9 Mar 2002 23:21:49 -   1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
 1.4 2001/09/28 02:16:32 remm Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/09/28 02:16:32 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/naming/resources/ResourceAttributes.java,v
 1.5 2002/03/09 23:21:49 remm Exp $
  + * $Revision: 1.5 $
  + * $Date: 2002/03/09 23:21:49 $
*
* 
*
  @@ -83,7 +83,7 @@
* Attributes implementation.
* 
* @author a href=mailto:[EMAIL PROTECTED];Remy Maucherat/a
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
*/
   public class ResourceAttributes implements Attributes {
   
  @@ -259,6 +259,18 @@
   
   
   /**
  + * Weak ETag.
  + */
  +protected String weakETag = null;
  +
  +
  +/**
  + * Strong ETag.
  + */
  +protected String strongETag = null;
  +
  +
  +/**
* External attributes.
*/
   protected Attributes attributes = null;
  @@ -664,7 +676,60 @@
   if (attributes != null)
   attributes.put(TYPE, resourceType);
   }
  -
  +
  +
  +/**
  + * Get ETag.
  + * 
  + * @return Weak ETag
  + */
  +public String getETag() {
  +return getETag(false);
  +}
  +
  +
  +/**
  + * Get ETag.
  + * 
  + * @param strong If true, the strong ETag will be returned
  + * @return ETag
  + */
  +public String getETag(boolean strong) {
  +String result = null;
  +if (attributes != null) {
  +Attribute attribute = attributes.get(ETAG);
  +if (attribute != null) {
  +try {
  +result = attribute.get().toString();
  +} catch (NamingException e) {
  +; // No value for the attribute
  +}
  +}
  +}
  +if (strong) {
  +// The strong ETag must always be calculated by the resources
  +result = strongETag;
  +} else {
  +// The weakETag is contentLenght + lastModified
  +if (weakETag == null) {
  +weakETag = W/\ + getContentLength() + - 
  ++ getLastModified() + \;
  +}
  +result = weakETag;
  +}
  +return result;
  +}
  +
  +
  +/**
  + * Set strong ETag.
  + */
  +public void setETag(String eTag) {
  +this.strongETag = eTag;
  +if (attributes != null)
  +attributes.put(ETAG, eTag);
  +}
  +
   
   // - Attributes Methods
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets DefaultServlet.java WebdavServlet.java

2002-03-09 Thread remm

remm02/03/09 15:22:38

  Modified:catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java WebdavServlet.java
  Log:
  - Add some hooks to allow the directory context implementation
to compute strong etags.
  
  Revision  ChangesPath
  1.51  +22 -26
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- DefaultServlet.java   8 Jan 2002 12:14:57 -   1.50
  +++ DefaultServlet.java   9 Mar 2002 23:22:38 -   1.51
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.50 2002/01/08 12:14:57 remm Exp $
  - * $Revision: 1.50 $
  - * $Date: 2002/01/08 12:14:57 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.51 2002/03/09 23:22:38 remm Exp $
  + * $Revision: 1.51 $
  + * $Date: 2002/03/09 23:22:38 $
*
* 
*
  @@ -125,7 +125,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.50 $ $Date: 2002/01/08 12:14:57 $
  + * @version $Revision: 1.51 $ $Date: 2002/03/09 23:22:38 $
*/
   
   public class DefaultServlet
  @@ -785,7 +785,7 @@
ResourceInfo resourceInfo)
   throws IOException {
   
  -String eTag = getETag(resourceInfo, true);
  +String eTag = getETag(resourceInfo);
   long fileLength = resourceInfo.length;
   long lastModified = resourceInfo.date;
   
  @@ -918,31 +918,21 @@
   
   
   /**
  - * Get the ETag value associated with a file.
  - *
  - * @param resourceInfo File object
  - * @param strong True if we want a strong ETag, in which case a checksum
  - * of the file has to be calculated
  - */
  -protected String getETagValue(ResourceInfo resourceInfo, boolean strong) {
  -// FIXME : Compute a strong ETag if requested, using an MD5 digest
  -// of the file contents
  -return resourceInfo.length + - + resourceInfo.date;
  -}
  -
  -
  -/**
* Get the ETag associated with a file.
*
* @param resourceInfo File object
* @param strong True if we want a strong ETag, in which case a checksum
* of the file has to be calculated
*/
  -protected String getETag(ResourceInfo resourceInfo, boolean strong) {
  -if (strong)
  -return \ + getETagValue(resourceInfo, strong) + \;
  -else
  -return W/\ + getETagValue(resourceInfo, strong) + \;
  +protected String getETag(ResourceInfo resourceInfo) {
  +if (resourceInfo.strongETag != null) {
  +return resourceInfo.strongETag;
  +} else if (resourceInfo.weakETag != null) {
  +return resourceInfo.weakETag;
  +} else {
  +return W/\ + resourceInfo.length + - 
  ++ resourceInfo.date + \;
  +}
   }
   
   
  @@ -1199,7 +1189,7 @@
   ranges = parseRange(request, response, resourceInfo);
   
   // ETag header
  -response.setHeader(ETag, getETag(resourceInfo, true));
  +response.setHeader(ETag, getETag(resourceInfo));
   
   // Last-Modified header
   if (debug  0)
  @@ -1416,7 +1406,7 @@
   String headerValue = request.getHeader(If-Range);
   if (headerValue != null) {
   
  -String eTag = getETag(resourceInfo, true);
  +String eTag = getETag(resourceInfo);
   long lastModified = resourceInfo.date;
   
   Date date = null;
  @@ -2269,6 +2259,8 @@
   public long date;
   public long length;
   public boolean collection;
  +public String weakETag;
  +public String strongETag;
   public boolean exists;
   public DirContext resources;
   protected InputStream is;
  @@ -2285,6 +2277,8 @@
   date = 0;
   length = -1;
   collection = true;
  +weakETag = null;
  +strongETag = null;
   exists = false;
   resources = null;
   is = null;
  @@ -2329,6 +2323,8 @@
   } else {
   httpDate = FastHttpDateFormat.getCurrentDate();
   }
  +weakETag = tempAttrs.getETag();
  +strongETag = tempAttrs.getETag(true);
   length = tempAttrs.getContentLength();

DO NOT REPLY [Bug 6519] - Problem with HTMLManagerServlet when running JDK1.4

2002-03-09 Thread bugzilla

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

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

Problem with HTMLManagerServlet when running JDK1.4

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2002-03-09 23:33 ---
I'll mark it as fixed, as the new HTTP/1.1 connector fixes it, mostly by
abstracting the output handling and using fake writers.

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




Tomcat 4.0.4b1 calls init() twice? (and strange bugs)

2002-03-09 Thread Kevin A. Burton

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


OK... this is very strange.  All the Tomcat 3.x and 4.x series did not do this.

Now for some reason Tomcat 4.0.4b1 calls my init() method twice.  I put in some
defensive programming to detect this but a 4.0.4 final should NOT have this bug.

Also... both the 4.0.3 and 4.0.4b1 series seem very buggy.  These are definitely
below the quality I have come to expect from Apache/Tomcat releases.

Specifically, I am running into strange classloader issues under both 4.0.3 and
4.0.4b1.  If I gather more information I will report it.  The problem is that i
am getting sporadic behavior.  For example 4.0.3 can't load xalan.jar (or some
subset of the classes) under the correct webapp.

I am also getting some classes that aren't found within the same .jar that
other classes ARE found.

Again... I wish I could be more specific but it is a strange bug.

Anyway... thanks.

- -- 
Kevin A. Burton ( [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] )
 Location - San Francisco, CA, Cell - 415.595.9965
Jabber - [EMAIL PROTECTED],  Web - http://relativity.yi.org/

Any sufficiently advanced terrorist is indistinguishable from Osama Bin Laden.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Get my public key at: http://relativity.yi.org/pgpkey.txt

iD8DBQE8iqR5AwM6xb2dfE0RAl2SAJ94wLCZqEyB1acMX8IofWsTZQYsXACgsr16
tYrRWNN3LjCZ8cMgJmIOa7I=
=NiK8
-END PGP SIGNATURE-

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




DO NOT REPLY [Bug 7007] New: - Invalid names in web.xml generated by JspC for top-level JSP pages

2002-03-09 Thread bugzilla

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

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

Invalid names in web.xml generated by JspC for top-level JSP pages

   Summary: Invalid names in web.xml generated by JspC for top-level
JSP pages
   Product: Tomcat 4
   Version: 4.0.4 Beta 1
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The web.xml elements generated by JspC contains invalid names for JSP pages at 
the top-level in a web application structure. All names are prefixed with a
dot (.), e.g.:

servlet
servlet-name.test/servlet-name
servlet-class.test/servlet-class
/servlet

servlet-mapping
servlet-name.test/servlet-name
url-pattern/test.jsp/url-pattern
/servlet-mapping

The JspC parseFile() method tries to handle the case where the package
name is not set with this code:

  if  (clc.getPackageName() == null) {
thisServletName = clc.getClassName();
  } else {
thisServletName = clc.getPackageName()
  + '.' + clc.getClassName();
  }

but I guess there are case when getPackageName() returns  instead of
null, so it still doesn't work. Adding a test for the empty string
should fix the problem.

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




Re: Tomcat 4.0.4b1 calls init() twice? (and strange bugs)

2002-03-09 Thread Remy Maucherat

 OK... this is very strange.  All the Tomcat 3.x and 4.x series did not do
this.

 Now for some reason Tomcat 4.0.4b1 calls my init() method twice.  I put in
some
 defensive programming to detect this but a 4.0.4 final should NOT have
this bug.

 Also... both the 4.0.3 and 4.0.4b1 series seem very buggy.  These are
definitely
 below the quality I have come to expect from Apache/Tomcat releases.

 Specifically, I am running into strange classloader issues under both
4.0.3 and
 4.0.4b1.  If I gather more information I will report it.  The problem is
that i
 am getting sporadic behavior.  For example 4.0.3 can't load xalan.jar (or
some
 subset of the classes) under the correct webapp.

I already apologized 3 times for the problems with Xalan in particular.
Thankfully, the workaround is simple enough.
So here's one more:
I'd like to apologoize for letting this bug sneak in the release.

4.0.4 b1 should fix it (at least with Xalan). The only thing this release
should not like is if you have the servlet API classes in a JAR.

Both 4.0.2 and 4.0.4 b1 fix a lot of bugs which existed in 4.0.1, so I don't
consider them any more buggy than 4.0.1, or esp 4.0. I guess if you were
using native connectors, you would have a much different opinion ;-)
I don't see any change which would cause the multiple init invocation. I've
seen reports of this with JSPs, but none with servlets. Does it also happen
with 4.0.3, or is it only with 4.0.4 b1 ?

 I am also getting some classes that aren't found within the same .jar that
 other classes ARE found.

 Again... I wish I could be more specific but it is a strange bug.

 Anyway... thanks.

Remy


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




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 - New directory

2002-03-09 Thread billbarker

billbarker02/03/09 22:08:27

  jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 - New directory

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




cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3 CoyoteInterceptor.java CoyoteProcessor.java CoyoteRequest.java CoyoteResponse.java

2002-03-09 Thread billbarker

billbarker02/03/09 22:14:37

  Added:   coyote/src/java/org/apache/coyote/tomcat3
CoyoteInterceptor.java CoyoteProcessor.java
CoyoteRequest.java CoyoteResponse.java
  Log:
  Adding the Tomcat 3.3 Coyote file.
  
  They all compile, which is enough for an initial check-in.  The threading and socket 
handling is all standard 3.3.x stuff.
  
  TODO:
- Improve the handling of the Response headers.
- Review (and likely improve) the handling of the Request headers.
- Create the WAR module to allow this to be plugged in.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote/tomcat3/CoyoteInterceptor.java
  
  Index: CoyoteInterceptor.java
  ===
  /*
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in
   *the documentation and/or other materials provided with the
   *distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *any, must include the following acknowlegement:  
   *   This product includes software developed by the 
   *Apache Software Foundation (http://www.apache.org/).
   *Alternately, this acknowlegement may appear in the software itself,
   *if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names The Jakarta Project, Tomcat, and Apache Software
   *Foundation must not be used to endorse or promote products derived
   *from this software without prior written permission. For written 
   *permission, please contact [EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called Apache
   *nor may Apache appear in their names without prior written
   *permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * http://www.apache.org/.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */ 
  
  
  package org.apache.coyote.tomcat3;
  
  import java.io.*;
  import java.net.*;
  import java.util.*;
  import java.text.*;
  import org.apache.tomcat.core.*;
  import org.apache.tomcat.util.res.StringManager;
  import org.apache.tomcat.util.buf.*;
  import org.apache.tomcat.util.http.*;
  import org.apache.tomcat.util.net.*;
  import org.apache.tomcat.util.net.ServerSocketFactory;
  import org.apache.tomcat.util.log.*;
  import org.apache.tomcat.util.compat.*;
  import org.apache.tomcat.modules.server.PoolTcpConnector;
  import org.apache.coyote.Adapter;
  import org.apache.coyote.Processor;
  
  /** Standalone http.
   *
   *  Connector properties:
   *  ul
   *  li secure - will load a SSL socket factory and act as https server/li
   *  /ul
   *
   *  Properties passed to the net layer:
   *  ul
   *  litimeout/li
   *  libacklog/li
   *  liaddress/li
   *  liport/li
   *  /ul
   * Thread pool properties:
   *  ul
   *  liminSpareThreads/li
   *  limaxSpareThreads/li
   *  limaxThreads/li
   *  lipoolOn/li
   *  /ul
   * Properties for HTTPS:
   *  ul
   *  likeystore - certificates - default to ~/.keystore/li
   *  likeypass - password/li
   *  liclientauth - true if the server should authenticate the client using 
certs/li
   *  /ul
   * Properties for HTTP:
   *  ul
   *  lireportedname - name 

cvs commit: jakarta-tomcat-connectors/coyote build.xml

2002-03-09 Thread billbarker

billbarker02/03/09 22:15:47

  Modified:coyote   build.xml
  Log:
  Update to allow us to build both the 4.x and the 3.3.x jars.
  
  Revision  ChangesPath
  1.6   +35 -5 jakarta-tomcat-connectors/coyote/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-connectors/coyote/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml 31 Jan 2002 18:42:29 -  1.5
  +++ build.xml 10 Mar 2002 06:15:47 -  1.6
  @@ -3,7 +3,7 @@
   
   !--
   Coyote connector framework for Jakarta Tomcat
  -$Id: build.xml,v 1.5 2002/01/31 18:42:29 remm Exp $
  +$Id: build.xml,v 1.6 2002/03/10 06:15:47 billbarker Exp $
   --
   
   
  @@ -35,7 +35,6 @@
   
 !-- The name of this component --
 property name=component.name  value=coyote/
  -
 !-- The title of this component --
 property name=component.title value=Coyote/
   
  @@ -79,6 +78,12 @@
   pathelement location=${catalina.home}/server/lib/catalina.jar/
   pathelement location=${catalina.home}/common/lib/servlet.jar/
 /path
  +  path id=compile.classpath.tomcat33
  +pathelement location=${build.home}/classes/
  +pathelement location=${tomcat33.home}/lib/container/tomcat_util.jar/
  +pathelement location=${tomcat33.home}/lib/container/tomcat_modules.jar/
  +pathelement location=${tomcat33.home}/lib/common/tomcat_core.jar/
  +  /path
   
   
   !-- == Test Execution Defaults === --
  @@ -106,8 +111,11 @@
   target name=report-tc4 if=tomcat4.detect 
echo message=Tomcat4 detected   /
   /target
  +target name=report-tc33 if=tomcat33.detect 
  + echo message=Tomcat3.3 detected   /
  +/target
   
  -target name=report depends=report-tc4 /
  +target name=report depends=report-tc4, report-tc33 /
   
   
   !-- == Executable Targets  --
  @@ -131,6 +139,7 @@
   mkdir dir=${build.home}/lib/
   mkdir dir=${build.home}/tests/
   available property=tomcat4.detect 
file=${catalina.home}/server/lib/catalina.jar /
  +available property=tomcat33.detect 
file=${tomcat33.home}/lib/common/tomcat_core.jar /
 /target
   
   
  @@ -152,6 +161,7 @@
 optimize=${compile.optimize}
 classpath refid=compile.classpath/
 exclude name=org/apache/coyote/tomcat4/** /
  +  exclude name=org/apache/coyote/tomcat3/** /
   /javac
   copytodir=${build.home}/classes filtering=on
 fileset dir=${source.home} excludes=**/*.java/
  @@ -173,14 +183,34 @@
 fileset dir=${source.home} excludes=**/*.java/
   /copy
 /target
  +  target name=compile.tomcat33 if=tomcat33.detect
  +   description=Compile Tomcat 3.3.x Adapter
  +javac  srcdir=${source.home}
  +   destdir=${build.home}/classes
  + debug=${compile.debug}
  +   deprecation=${compile.deprecation}
  +  optimize=${compile.optimize}
  +  classpath refid=compile.classpath.tomcat33/
  +  include name=org/apache/coyote/tomcat3/** /
  +/javac
  +copytodir=${build.home}/classes filtering=on
  +  fileset dir=${source.home} excludes=**/*.java/
  +/copy
  +  /target
   
 target name=compile 
  -   depends=static,report,compile.shared,compile.tomcat4
  +   depends=static,report,compile.shared,compile.tomcat4,compile.tomcat33
  description=Compile Coyote and its Adapters
   jarjarfile=${build.home}/lib/tomcat-${component.name}.jar
   basedir=${build.home}/classes
  manifest=${build.home}/conf/MANIFEST.MF
  -   includes=org/apache/coyote/** /
  +   includes=org/apache/coyote/** 
  +excludes=**/tomcat3/* /
  +jarjarfile=${build.home}/lib/tomcat33-${component.name}.jar
  +basedir=${build.home}/classes
  +   manifest=${build.home}/conf/MANIFEST.MF
  +   includes=org/apache/coyote/** 
  +excludes=**/tomcat4/* /
 /target
   
   
  
  
  

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




Re: cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http MimeHeaders.java

2002-03-09 Thread Bill Barker

You really like making work for me, don't you? ;-)

I'll port this to 3.3 branch unless somebody objects.  Adding a method that
isn't currently called by 3.3 doesn't hurt anything, and o.a.t.* classes
should (need to) be the same in j-t-c and 3.3 for now.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 09, 2002 10:54 AM
Subject: cvs commit:
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http
MimeHeaders.java


 remm02/03/09 10:54:28

   Modified:util/java/org/apache/tomcat/util/http MimeHeaders.java
   Log:
   - Add a method allowing to create a header using a char buffer.

   Revision  ChangesPath
   1.3   +9 -0
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/MimeHeaders.
java

   Index: MimeHeaders.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/http/Mi
meHeaders.java,v
   retrieving revision 1.2
   retrieving revision 1.3
   diff -u -r1.2 -r1.3
   --- MimeHeaders.java 31 Dec 2001 18:20:05 - 1.2
   +++ MimeHeaders.java 9 Mar 2002 18:54:28 - 1.3
   @@ -288,6 +288,15 @@
return mhf.getValue();
}

   +/** Create a new named header using translated char[].
   + */
   +public MessageBytes addValue(char c[], int startN, int endN)
   +{
   + MimeHeaderField mhf=createHeader();
   + mhf.getName().setChars(c, startN, endN);
   + return mhf.getValue();
   +}
   +
/** Allow set operations -
return a MessageBytes container for the
header value ( existing header or new




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




Manager Command List in TC 4.0.3

2002-03-09 Thread Pae Choi

Folks,

I am awaring of some commands in the Manager app, e.g., [1]Manager App
HOW-TO. Is there a way to get all available commands? If not, wouldn't
it
be nice to have it? Something like,

http(s)://{host}:{port}/manager/command?list

Or in a simliar fashion. How is that? :-). Thank you.

Best,


Pae



[1] Manager App HOW-TO
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/http MimeHeaders.java

2002-03-09 Thread billbarker

billbarker02/03/09 23:09:00

  Modified:src/share/org/apache/tomcat/util/http MimeHeaders.java
  Log:
  Port of Remy's change in j-t-c.
  
  This does nothing to the current 3.3.x code (since nobody calls it), but needs to be 
here for people testing j-t-c code against 3.3.x.
  
  Revision  ChangesPath
  1.5   +10 -1 
jakarta-tomcat/src/share/org/apache/tomcat/util/http/MimeHeaders.java
  
  Index: MimeHeaders.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/http/MimeHeaders.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MimeHeaders.java  31 Aug 2001 04:13:11 -  1.4
  +++ MimeHeaders.java  10 Mar 2002 07:09:00 -  1.5
  @@ -288,7 +288,16 @@
return mhf.getValue();
   }
   
  -/** Allow set operations - 
  +/** Create a new named header using translated char[].
  + */
  +public MessageBytes addValue(char c[], int startN, int endN)
  +{
  + MimeHeaderField mhf=createHeader();
  + mhf.getName().setChars(c, startN, endN);
  + return mhf.getValue();
  +}
  +  
  +   /** Allow set operations - 
   return a MessageBytes container for the
header value ( existing header or new
if this .
  
  
  

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




Re: cvs commit: jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11 Http11Processor.java InternalInputBuffer.java

2002-03-09 Thread Bill Barker

I'd like it if this could make it into o.a.c.Processor as well.  Since
Costin has done a lot of work on this in 3.3, I'd like to make it settable
(with a default of true), and if it is in Processor I don't have to resort
to introspection.

It's not a big deal, since the introspection tools are good.  If you feel
that this isn't going to stay around long, I can live with the introspection
solution.
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 09, 2002 11:05 AM
Subject: cvs commit:
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
Http11Processor.java InternalInputBuffer.java


 remm02/03/09 11:05:35

   Modified:http11/src/java/org/apache/coyote/http11
 Http11Processor.java InternalInputBuffer.java
   Log:
   - Port the tricks used by the old HTTP/1.1 connector to optimize
handling
 of the US-ASCII parts of the HTTP header (method + protocol + header
names
 + URI in most cases).
   - Note: The handling of the URI is probably not very satisfactory, but
until the
 servlet container can handle a byte-based URL, there's no point in
being fancy.

   Revision  ChangesPath
   1.6   +20 -0
jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11/Http11Pro
cessor.java

   Index: Http11Processor.java
   ===
   RCS file:
/home/cvs/jakarta-tomcat-connectors/http11/src/java/org/apache/coyote/http11
/Http11Processor.java,v
   retrieving revision 1.5
   retrieving revision 1.6
   diff -u -r1.5 -r1.6
   --- Http11Processor.java 9 Mar 2002 05:20:03 - 1.5
   +++ Http11Processor.java 9 Mar 2002 19:05:35 - 1.6
   @@ -249,6 +249,26 @@


/**
   + * Get the value of the internationalized URI flag.
   + *
   + * @return the value of the internationalized URI flag
   + */
   +public boolean isInternationalizedURIAllowed() {
   +return inputBuffer.isInternationalizedURIAllowed();
   +}
   +
   +
   +/**
   + * Set the value of the internationalized URI flag.
   + *
   + * @param flag New value of the internationalized URI flag
   + */
   +public void setInternationalizedURIAllowed(boolean flag) {
   +inputBuffer.setInternationalizedURIAllowed(flag);
   +}
   +
   +
   +/**
 * Process pipelined HTTP requests using the specified input and
output
 * streams.
 *






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