Re: NullPointerException from HttpSessionFacade.invalidate()

2001-01-13 Thread Christopher K. St. John

"Craig R. McClanahan" wrote:
> 
> If your server implements session swapping or distribution (as we are currently
> developing in the 4.1 repository), it is pretty much guaranteed that different
> session object instances may be used during the lifetime of the same session.
> 

 But don't you get session lifecycle events if that happens?


-cks

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




[Tomcat 4.0] Updated Documentation

2001-01-13 Thread Craig R. McClanahan

I spent some time this afternoon creating the beginnings of a documentation
bundle for Tomcat 4.0.  It is not yet complete, and not yet copied into the
binary build of Tomcat 4.0, but I've also arranged that it be snapshotted on the
Tomcat web site, at:

http://jakarta.apache.org/tomcat

The information that is presented in the Server Configuration section is all up
to date AFAIKT, but several sections are not yet written.  With this, as with
the rest of the docs (and the code, of course :-), feel free to suggest changes,
send patches, or volunteer to do some of the writing!

Craig McClanahan



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




Re: Patches and TC 4.1

2001-01-13 Thread Craig R. McClanahan

Remy Maucherat wrote:

> > David Weinrich wrote:
> >
> > Now that it's an Apache project, I am +1 for using it ... both here, and
> as an
> > implementation of org.apache.catalina.Logger for the general purpose
> logging
> > that goes on inside Catalina.
>
> +1.
> Will it be required to build ?
>

If we agree to use it (log4j) to implement standard functionality, then it
will.  If we use it only for optional stuff, we could make the build scripts
smart enough to recognize this and not compile the optional features, although
IMHO this is *much* more confusing to users who expect a binary distribution to
be "complete".

>
> > I will be examining your patches (and Kief's work on session persistence)
> over
> > the weekend -- look for some commits and/or questions later on.
>
> I was planning to do that, but as I already have a number of items in my
> tasklist it would have taken a while before I applied them.
>
> TC 4.1 should be running fine again. There are no known issues (even with
> WebDAV) except an unimplemented call in the ServletContext.
> The "old" Resources are now gone and replaced with JNDI DirContext. After a
> few adjustements are made, the DefaultServlet / WebdavServlet should be able
> to serve resources from any DirContext implementation (of course, if the
> result of a lookup isn't the special wrapper type Resource or an input
> stream, the string representation of the object will be served, which isn't
> that useful).
>

I have an issue with 4.1 code (fresh from CVS) at the moment -- the JSP examples
do not run correctly.  That is, any JSP page that references a bean class that
is loaded from WEB-INF/classes or WEB-INF/lib fails to find that class.

>
> The JARs which are in the /WEB-INF/lib directory in the webapp are still
> loaded from the filesystem, which may or may not be a problem. Classes in
> /WEB-INF/classes are correctly loaded through URLs. I know why this happen,
> and there's no easy way around. One solution I found is providing a more
> complete classloader for the webapps. I'll try to do that, see how good or
> bad it turns out, and commit it if it works ok (it will be called
> WebappClassLoader).
>
> I'll probably do some clenup work in DefaultServlet and WebdavServlet next,
> as the algorithms could be made more efficient (they were adapted for the
> Resources' naming conventions, which were not the same as the JNDI naming
> conventions).
>
> I'd like to make a few proposals :
> - Move the org.apache.naming package and subpackages, which is part of the
> Catalina subproject right now, and make it an independent Tomcat subproject.
> - Do the same for the org.apache.catalina.util package (and rename it
> org.apache.tomcat.util).
>

By this, do you mean make them separate top-level subdirectories under
jakarta-tomcat-4.1?  If so, I'm +1.

>
> Remy
>

Craig



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




Re: NullPointerException from HttpSessionFacade.invalidate()

2001-01-13 Thread Craig R. McClanahan

Hans Bergsten wrote:

>
> I agree that it's reasonable to assume that the same HttpSession
> instance is used throughout the session in the most common case,
> but I don't agree that the spec mandates this implementation (and
> I don't think it should mandate implementation details unless it's
> absolutely necessary for portability). But in a container that
> saves sessions to disk to conserve memory, or during server restart,
> you will most definitely see more than one instance. Same thing
> for a distributable application, where the session may migrate
> to another server.
>

If your server implements session swapping or distribution (as we are currently
developing in the 4.1 repository), it is pretty much guaranteed that different
session object instances may be used during the lifetime of the same session.

This is also true if you take advantage of the current support in Tomcat 3.2 and
4.0 for saving and restoring sessions across a server restart.

Craig



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




cvs commit: jakarta-tomcat-4.0/catalina/docs/dev README.html architecture.html building.html new_spec.html todo.html

2001-01-13 Thread craigmcc

craigmcc01/01/13 20:26:11

  Modified:catalina/docs index.html
   catalina/docs/dev README.html architecture.html
building.html new_spec.html todo.html
  Log:
  Update the links for the developer documentation related to Catalina.
  
  Revision  ChangesPath
  1.4   +3 -1  jakarta-tomcat-4.0/catalina/docs/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/index.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- index.html2001/01/14 01:31:44 1.3
  +++ index.html2001/01/14 04:26:10 1.4
  @@ -21,7 +21,9 @@
   
   
   Developer Documentation
  -
  +
  +Developer Documentation
  +
   
   
   
  
  
  
  1.2   +5 -1  jakarta-tomcat-4.0/catalina/docs/dev/README.html
  
  Index: README.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/dev/README.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- README.html   2000/08/30 22:32:07 1.1
  +++ README.html   2001/01/14 04:26:11 1.2
  @@ -5,6 +5,8 @@
   
   
   
  +Home
  +
   What is Catalina?
   
   Catalina is the reference implementation of the
  @@ -55,15 +57,17 @@
   prerequisites and steps required to build Catalina (as well as integrate
   it with Jasper and the example webapps if you want to) using the
   Tomcat 4.0 source distribution (or a CVS checkout of this code).
  +
   
   
   
   
   
  -$Id: README.html,v 1.1 2000/08/30 22:32:07 craigmcc Exp $
  +$Id: README.html,v 1.2 2001/01/14 04:26:11 craigmcc Exp $
   
   
   
  
  
  
  1.4   +3 -1  jakarta-tomcat-4.0/catalina/docs/dev/architecture.html
  
  Index: architecture.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/dev/architecture.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- architecture.html 2000/10/18 19:46:18 1.3
  +++ architecture.html 2001/01/14 04:26:11 1.4
  @@ -5,6 +5,8 @@
   
   
   
  +Home
  +
   Thanks to the efforts of Dave Johnson and Richard Frazer of Haht Commerce,
   we have the following UML diagrams that document the internal architecture
   of the Catalina servlet container (inside Tomcat 4.0):
  @@ -17,7 +19,7 @@
   
   
   
  -$Id: architecture.html,v 1.3 2000/10/18 19:46:18 craigmcc Exp $
  +$Id: architecture.html,v 1.4 2001/01/14 04:26:11 craigmcc Exp $
   
   
   
  
  
  
  1.2   +8 -1  jakarta-tomcat-4.0/catalina/docs/dev/building.html
  
  Index: building.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/dev/building.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- building.html 2000/08/30 22:32:07 1.1
  +++ building.html 2001/01/14 04:26:11 1.2
  @@ -5,6 +5,13 @@
   
   
   
  +Home
  +
  +
  +WARNING: These instructions are not up-to-date.
  +See the README.txt file in the top-level source directory.
  +
  +
   Install Software Prerequisites
   
   In order to build Catalina, you will need to download and install the
  @@ -180,7 +187,7 @@
   
   
   
  -$Id: building.html,v 1.1 2000/08/30 22:32:07 craigmcc Exp $
  +$Id: building.html,v 1.2 2001/01/14 04:26:11 craigmcc Exp $
   
   
   
  
  
  
  1.2   +3 -1  jakarta-tomcat-4.0/catalina/docs/dev/new_spec.html
  
  Index: new_spec.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/dev/new_spec.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- new_spec.html 2000/08/30 22:32:07 1.1
  +++ new_spec.html 2001/01/14 04:26:11 1.2
  @@ -4,6 +4,8 @@
   
   
   
  +Home
  +
   This document summarizes the current implementation state of the new
   features of the Servlet 2.3 draft specification in Catalina.  To give a
   quick synopsis of the completion state of each new feature, we're
  @@ -79,7 +81,7 @@
   
   
   
  -$Id: new_spec.html,v 1.1 2000/08/30 22:32:07 craigmcc Exp $
  +$Id: new_spec.html,v 1.2 2001/01/14 04:26:11 craigmcc Exp $
   
   
   
  
  
  
  1.3   +4 -2  jakarta-tomcat-4.0/catalina/docs/dev/todo.html
  
  Index: todo.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/dev/todo.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- todo.html 2001/01/11 23:07:09 1.2
  +++ todo.html 2001/01/14 04:26:11 1.3
  @@ -1,10 +1,12 @@
   
   
   Catalina TODO List
  -/head>
  +
   
   
   
  +Home
  +
   This document is a living list of the action items related to the
   current development of the Catalina servlet con

cvs commit: jakarta-tomcat-4.0/catalina/docs filters.html

2001-01-13 Thread craigmcc

craigmcc01/01/13 20:18:14

  Removed: catalina/docs filters.html
  Log:
  Remove obsolete file.

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




cvs commit: jakarta-tomcat-4.0/catalina/docs/config categories.html context.html engine.html host.html http11.html

2001-01-13 Thread craigmcc

craigmcc01/01/13 20:17:05

  Modified:catalina/docs/config categories.html context.html
engine.html host.html http11.html
  Log:
  Major update to the configuration documentation for Tomcat 4.0.
  
  TODO:  Flesh out the information on the WARP connector, and create
  documentation for the various utility components.
  
  Revision  ChangesPath
  1.2   +21 -16jakarta-tomcat-4.0/catalina/docs/config/categories.html
  
  Index: categories.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/config/categories.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- categories.html   2000/08/11 05:21:04 1.1
  +++ categories.html   2001/01/14 04:17:05 1.2
  @@ -5,36 +5,41 @@
   
   
   
  +Home
  +
  +Home
  +
  +
   Overview
   
  -Title Page
  -Introduction
  -Example
  +Title Page
  +Introduction
  +Example
   
   
   Connectors
   
  -Overview
  -HTTP/1.1
  +HTTP/1.1
  +WARP
   
   
   Containers
   
  -Overview
  -Engine
  -Host
  -Context
  +Server
  +Service
  +Engine
  +Host
  +Context
   
   
   Utilities
   
  -Overview
  -Listener
  -Loader
  -Manager
  -Realm
  -Resources
  -Valve
  +Loader
  +Logger
  +Manager
  +Realm
  +Resources
  +Valve
   
   
   
  
  
  
  1.2   +88 -70jakarta-tomcat-4.0/catalina/docs/config/context.html
  
  Index: context.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/config/context.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- context.html  2000/08/11 05:21:04 1.1
  +++ context.html  2001/01/14 04:17:05 1.2
  @@ -19,37 +19,43 @@
   
   Introduction
   
  -A Context component represents an individual web application that
  -is running within a particular Host.  Such a web
  -application is based on a directory whose organization is described in the
  -Servlet API Specification, version 2.2 -- including the web application
  -deployment descriptor file, found in "WEB-INF/web.xml".
  +A Context component represents an individual web
  +application that is running within a particular Host.
  +Such a web application is based on a directory whose organization is described
  +in the Servlet API Specification, version 2.2 -- including the web application
  +deployment descriptor file, found in "WEB-INF/web.xml".
   
   The web application used to process a particular request is selected by
   Catalina based on matching the longest possible prefix of the request URI
  -against the "context path" of each defined Context.  Once selected, that
  +against the context path of each defined Context.  Once selected, that
   Context will select an appropriate servlet to process the incoming request,
  -based on the request mapping rules that are also found in the servlet
  -specification.
  -
  -You may define as many Context components as you wish, nested
  -within a Host component in the conf/server.xml file.
  -Each such Context must have a unique context path, defined by the
  -path attribute.  In addition, you must define a context
  -with a path equal to a zero-length string, which becomes the default
  -web application to process requests when a different context cannot be
  -matched.  There are also special features of the
  +according to the servlet mappings defined in the web application deployment
  +descriptor, based on the request mapping rules that are also found in the
  +servlet specification.
  +
  +You may define as many Context components as you wish,
  +nested within a Host component in the
  +conf/server.xml file.  Each such Context must have a unique
  +context path, defined by the path attribute.  In addition,
  +you must define a context with a path equal to a zero-length
  +string, which becomes the default web application to process requests when a
  +different context cannot be matched.  There are also special features of the
   Host configuration that enable
  -automatic creation of Context components without having to explicitly
  -mention them.
  +automatic creation of Context components without having
  +to explicitly mention them.
  +
  +Request processing Valves that are nested
  +here will be executed for every request received for processing by this
  +web application.
   
   
   
  +
   
   Common Attributes
   
  -All implementations of the Context component support the following
  -attributes, which can be defined in a  element:
  +All implementations of the Context component support the
  +following attributes:
   
   
   
  @@ -61,9 +67,9 @@
 
   className
   Java class name of the implementation to use.  This class must
  -implement the org.apache.tomcat.Context interface.  If
  +implement the org.apache.catalina.Context interface.  If
   no class name is specified, the standard implementation will be
  

Re: NullPointerException from HttpSessionFacade.invalidate()

2001-01-13 Thread Christopher K. St. John

Hans Bergsten wrote:
> 
> But in a container that
> saves sessions to disk to conserve memory, or during server restart,
> you will most definitely see more than one instance. Same thing
> for a distributable application, where the session may migrate
> to another server.
> 

 You can see more than one instance, but you will always
be notified by an HttpSessionEvent. That's part of the
"normal session lifecyle" I mentioned, and I think that
we agree there is no ambiguity in that case.


> and that I'm pretty sure that
> whatever it is you want to do can be done in a way that's more
> likely to be portable
>

 You may very well be right, but that's irrelevant. It
doesn't matter if there's a better way, it matters that
according to a reasonable interpretation of the current
spec, it should be legal. 


> All I'm saying is that it's dangerous to rely on behavior
> that's not clearly defined by the spec, 
>

 Well, yes, but you have to be able to make _some_ 
assumptions, or the spec would be 12 feet thick. In
general, you can assume that if the spec doesn't
specifically allow counterintuitive behavior, then
it's disallowed. 

 There is admittedly a very fine balancing act that the
spec has to pull off: it must be loose enough to allow
innovative implementations, but strict enough to allow
interoperability.

 But give me a break: what JServ is doing in this case
is just fantastically counterintiutive.

 This probably needs to be summarized and sent as 
spec feedback, but unless he says otherwise I will
assume Gokul Singh is going to do it (Gokul?)


-cks

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




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

2001-01-13 Thread remm

remm01/01/13 18:36:52

  Modified:catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java
  Log:
  - Oops, I wan't normalizing the right thing, which was causing problems depending
on how the servlet mappings were configured.
  
  Revision  ChangesPath
  1.22  +6 -6  
jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- DefaultServlet.java   2001/01/13 21:24:48 1.21
  +++ DefaultServlet.java   2001/01/14 02:36:52 1.22
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.21 2001/01/13 21:24:48 remm Exp $
  - * $Revision: 1.21 $
  - * $Date: 2001/01/13 21:24:48 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.22 2001/01/14 02:36:52 remm Exp $
  + * $Revision: 1.22 $
  + * $Date: 2001/01/14 02:36:52 $
*
* 
*
  @@ -118,7 +118,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.21 $ $Date: 2001/01/13 21:24:48 $
  + * @version $Revision: 1.22 $ $Date: 2001/01/14 02:36:52 $
*/
   
   public class DefaultServlet
  @@ -444,14 +444,14 @@
   }
   
   // No, extract the desired path directly from the request
  -String result = normalize(request.getPathInfo());
  +String result = request.getPathInfo();
   if (result == null) {
   result = request.getServletPath();
   }
   if ((result == null) || (result.equals(""))) {
   result = "/";
   }
  -return result;
  +return normalize(result);
   
   }
   
  
  
  

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




Re: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Anil Vijendran

Costin,

It would be really good if you could reconsider what you said and attend/call
into the meeting. As a principal developer of the 3.x tree your viewpoint,
input and experience should feed into the decision making process.

The PMC (not withstanding any particular member's behaviour) has been no
paragon of project management w.r.t the Jakarta project. Here's an
opportunity for you to think and bring up what could be changed w.r.t the PMC
and the rest of it all.

Please don't let someone's behaviour affect your attitude about this project.
Remember that it takes all kinds. So just dismiss it as a minor PITA and try
to focus on things that are more important (to you).

[EMAIL PROTECTED] wrote:

> >*) Tomcat 3.x vs. Tomcat 4.x. We will be reaching a final decision
> >about the future of the Tomcat source base and what our process
> >for managing the factors that created the current situation will
> >be moving forward. For reference you may want to read:
> >
> >http://www.x180.net/Mutterings/Apache/rules.html
> >
> >The Chairman hereby requests that parties from both sides of this
> >debate be present at this meeting to discuss.
>
> Given the PMC composition and the opinions expressed so far by some of the
> PMC members and the silence of the others, I'm sure you'll understand
> why I want to stop "beeing a party" of this project in general.
>
> If anyone wants to "debate" with Jon  - good luck, I had
> enough of that already, and I have a feeling that even the subject of the
> debate is wrongly choosen - ( the PMC "reaching final decisions about
> the tomcat source" in 1/4 of an afternoon debate, instead of the project
> commiters ).
>
> IMHO behaviors like Jon's should be the subject of the debate - but it
> seems Jon is a PMC member and one of the organizers of the meeting.
>
> ( in any case, I don't think I'm a "side" of any debate regarding tomcat -
> I just contributed code and time to a project and got flames back )
>
> Costin
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

--
Peace, Anil +<:-)




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




Re: IM LOST, ERROR 500????

2001-01-13 Thread mpangaro

Delivery failure: javax.mail.MessagingException: 452 Filesystem error - message not 
accepted

Hi Im writing my first little program that will welcome a user once she enters and submits her details into a web page.There is no problem Writing the JSP files but I cannot start a new .java file in Jbuilder, so I write it in Homesite, save it as .java and attempt to compile it to .class in Jbuilder. 
Im having difficulty converting the .javafile to .class 

I have tried compiling the .java file to a .class in JBuilder, but I keep getting the following warning: 

"Warning #908: check sourcepath; source c:\jakarta-tomcat\webapps\mary\Web-inf\Classes\namehandler.java cannot be found on source pathby appending \mary\namehandler.java to each sourcepath entry." 
(mary is the name of the package) 


When I try to view the program in my browser at http:// localhost etc etc I get the following error 
 



  

Error: 500
Location: /Mary/hellouser.jsp
Internal Servlet Error:org.apache.jasper.JasperException: Bad file argument to include     at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java, Compiled Code)    at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)    at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code)    at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)    at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)    at org.apache.jasper.compiler.Parser.parse(Parser.java:1034)    at org.apache.jasper.compiler.Compiler.compile(Compiler.java, Compiled Code)    at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413)    at org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:149)    at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:161)    at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)    at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)    at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled Code)    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)    at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)    at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)    at java.lang.Thread.run(Thread.java:479)PLEASE PLEASE PLEASE, anyone with help?Get your FREE download of MSN Explorer at http://explorer.msn.com

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


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


Re: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Hans Bergsten

[EMAIL PROTECTED] wrote:
> 
> >*) Tomcat 3.x vs. Tomcat 4.x. We will be reaching a final decision
> >about the future of the Tomcat source base and what our process
> >for managing the factors that created the current situation will
> >be moving forward. For reference you may want to read:
> >
> >http://www.x180.net/Mutterings/Apache/rules.html
> >
> >The Chairman hereby requests that parties from both sides of this
> >debate be present at this meeting to discuss.
> 
> Given the PMC composition and the opinions expressed so far by some of the
> PMC members and the silence of the others, I'm sure you'll understand
> why I want to stop "beeing a party" of this project in general.

I was silent in the most recent discussion on this list because
I have already expressed my opinions about the issue earlier and 
didn't find the latest debate productive.

> If anyone wants to "debate" with Jon  - good luck, I had
> enough of that already, and I have a feeling that even the subject of the
> debate is wrongly choosen - ( the PMC "reaching final decisions about
> the tomcat source" in 1/4 of an afternoon debate, instead of the project
> commiters ).

The meeting is not a "debate with Jon"; it's a PMC meeting with "open
doors". Jon is only one of seven PMC members, and the meeting will also
be attended by ASF board members. If you have any interest in the future
of
the Jakarta project, I think you should come.

> IMHO behaviors like Jon's should be the subject of the debate - but it
> seems Jon is a PMC member and one of the organizers of the meeting.

I don't always agree with what Jon says, but how he behaves is up to
him and hardly something I want on the agenda for a meeting ;-)
And for the record, it was James that called the meeting.

Hans

> ( in any case, I don't think I'm a "side" of any debate regarding tomcat -
> I just contributed code and time to a project and got flames back )
> 
> Costin

-- 
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

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




cvs commit: jakarta-tomcat-4.0/catalina/docs index.html JDBCRealm-howto.html manager.html singlesignon.html

2001-01-13 Thread craigmcc

craigmcc01/01/13 17:31:45

  Modified:catalina/docs JDBCRealm-howto.html manager.html
singlesignon.html
  Added:   catalina/docs index.html
  Log:
  General clean-up of the Tomcat 4.0 documentation bundle.
  
  Revision  ChangesPath
  1.3   +4 -1  jakarta-tomcat-4.0/catalina/docs/JDBCRealm-howto.html
  
  Index: JDBCRealm-howto.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/JDBCRealm-howto.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JDBCRealm-howto.html  2000/12/12 18:41:38 1.2
  +++ JDBCRealm-howto.html  2001/01/14 01:31:44 1.3
  @@ -14,7 +14,10 @@
   }
   
   Working with JDBCRealm
  +Home
  +
   Working with JDBCRealm
  +
   What is JDBCRealm?
   Is an implementation of a tomcat 4.X Realm that use a  set of configurable 
tables inside a RDMS to store  user's data, this tables are accessed by means of 
standard JDBC drivers.
   The passwords can be stored  as digested ( using standard Java's MessageDigest ) or 
in plain form.
  @@ -226,7 +229,7 @@
  - Make sure that the JDBC driver is in the lib directory.
   
   - If you have problem connecting you can specify connectionName and 
connectionPassword
  -$Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/docs/JDBCRealm-howto.html,v 1.2 2000/12/12 
18:41:38 nacho Exp $
  +$Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/docs/JDBCRealm-howto.html,v 1.3 2001/01/14 
01:31:44 craigmcc Exp $
   
   
   
  
  
  
  1.2   +7 -5  jakarta-tomcat-4.0/catalina/docs/manager.html
  
  Index: manager.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/manager.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- manager.html  2000/10/05 03:27:17 1.1
  +++ manager.html  2001/01/14 01:31:44 1.2
  @@ -1,11 +1,13 @@
   
   
  -Tomcat 4.0 Manager Application
  +Tomcat Manager Application
   
   
   
  +Home
  +
   
  -Tomcat 4.0 Manager Application
  +Tomcat Manager Application
   
   [Introduction]
   [Commands]
  @@ -16,7 +18,7 @@
   
   Introduction
   
  -Tomcat 4.0 ships with a web application (by default installed at context
  +Tomcat ships with a web application (by default installed at context
   path /manager) that facilitates deploying, undeploying, and
   reloading (that is, forcing a reload of all class files without removing the
   application from service) of other applications that are running in the same
  @@ -39,7 +41,7 @@
   as the extra path information, and request parameters, of HTTP requests made to
   the manager application.  The following command descriptions assume that you
   have installed the Manager application on context path /manager
  -on your local host installation of Tomcat 4.0.
  +on your local host installation of Tomcat.
   
   http://localhost:8080/manager/list - List the context paths of all
   web applications currently deployed on the virtual host in which this
  @@ -118,7 +120,7 @@
   
   
   
  -$Id: manager.html,v 1.1 2000/10/05 03:27:17 craigmcc Exp $
  +$Id: manager.html,v 1.2 2001/01/14 01:31:44 craigmcc Exp $
   
   
   
  
  
  
  1.2   +9 -7  jakarta-tomcat-4.0/catalina/docs/singlesignon.html
  
  Index: singlesignon.html
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/docs/singlesignon.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- singlesignon.html 2000/10/06 05:10:15 1.1
  +++ singlesignon.html 2001/01/14 01:31:44 1.2
  @@ -1,11 +1,13 @@
   
   
  -Configuring Tomcat 4.0 for Single Sign On Support
  +Configuring Tomcat for Single Sign On Support
   
   
   
  +Home
  +
   
  -Configuring Tomcat 4.0 for Single Sign On Support
  +Configuring Tomcat for Single Sign On Support
   
   [Introduction]
   [Requirements]
  @@ -20,19 +22,19 @@
   user the first time that he or she tries to access a protected area in any
   web application, and then recognize that authenticated user across other web
   applications in the same environment without requiring the user to log in
  -again.  Tomcat 4.0 supports that capability if it is configured as described
  +again.  Tomcat supports that capability if it is configured as described
   in this document.
   
   
   Configuration Requirements
   
  -To successfully configure Tomcat 4.0 for "single sign on" support, the
  +To successfully configure Tomcat for "single sign on" support, the
   following requirements must be taken into account:
   
   All clients that intend to utilize "single sign on" support must provide
   support for cookies, which are used to maintain the user identity across
   web applications.
  -As implemented in Tomcat 4.0, the scope of "single sign on" support is
  +As implemented in Tomcat, the scope

cvs commit: jakarta-tomcat-4.0/catalina/docs tomcat.gif

2001-01-13 Thread craigmcc

craigmcc01/01/13 17:31:10

  Added:   catalina/docs tomcat.gif
  Log:
  Add image used in user documentation.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/catalina/docs/tomcat.gif
  
<>
  
  

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




Re: NullPointerException from HttpSessionFacade.invalidate()

2001-01-13 Thread Hans Bergsten

"Christopher K. St. John" wrote:
> 
> Hans Bergsten wrote:
> >
> > "Christopher K. St. John" wrote:
> > >
> > >   7.3 Session Scope
> > >
> > >   HttpSession objects must be scoped at the
> > >   application / servlet context level. The
> > >   underlying mechanism, such as the cookie
> > >   used to establish the session, can be shared
> > >   between contexts, but the object exposed, and
> > >   more importantly the attributes in that object,
> > >   must not be shared between contexts.
> > >
> > >  By mentioning that the HttpSession object cannot
> > > be shared outside the ServletContext, it strongly
> > > implies that it can be shared within the context.
> > > If that sort of thing isn't allowed, then 7.3 might
> > > need to be clarified.
> >
> > This section refers to the fact that a servlet in one context should
> > not be able to gain access to the same session data as a servlet
> > in another context (i.e., resources in two different context's can
> > not "be part" of the same session) for security reasons .
> >
> > It has nothing to do with whether a servlet in one context is allowed
> > to hold on to the actual session object or not, which has to do with
> > how much freedom the spec gives to container vendors in terms of
> > pooling and life-cycle management for the internal objects.
> >
> 
>  Because Section 7.3 explicity discusses the HttpSession
> object itself (as opposed to the objects it contains), it
> suggests that the HttpSession object has an identity.
> 
>  I don't think there is any question that after the end
> of the lifecycle of an HttpSession object, it can be
> recycled. But what earlier messages in this thread suggested
> was that JServ was recycling HttpSession objects _during_
> the lifetime of the session, so that req.getSession(false) could
> return two different objects even within the same session.
> 
>  That would mean that the practice of synchronzing on the
> HttpSession object was also not kosher? Since two servlets
> within the same session at the same time could not be sure
> of getting the same HttpSession object? Are you really
> suggesting that that behavior is allowed by the spec?

All I'm saying is that it's dangerous to rely on behavior that's
not clearly defined by the spec, and that I'm pretty sure that
whatever it is you want to do can be done in a way that's more
likely to be portable than relying on any particular behavior
in Tomcat with regards to the container-managed objects, like
HttpSession, HttpServletRequest etc.

I agree that it's reasonable to assume that the same HttpSession 
instance is used throughout the session in the most common case, 
but I don't agree that the spec mandates this implementation (and 
I don't think it should mandate implementation details unless it's 
absolutely necessary for portability). But in a container that
saves sessions to disk to conserve memory, or during server restart,
you will most definitely see more than one instance. Same thing
for a distributable application, where the session may migrate
to another server.

Why would you synchronize on the HttpSession instance? It's
up to the container to make sure that you can add and remove
objects from the session in a thread-safe manner. If you need
to synchronize for thread-safety of your application objects,
sync on the application object or an internal "lock object"
instead.

Hans
-- 
Hans Bergsten   [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

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




Re: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Jon Stevens

on 1/13/01 3:10 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Of course, it would be nice to make the list archive available - since the
> PMC is "deciding the future of tomcat" I guess commiters should at
> least be able to read the debate.
> ( and have an example of "productive" debate - which is probably easier
> when one side have the representation it has ).

Well, the PMC is more than just debating the future of Tomcat and therefore
some of the postings there probably shouldn't necessarily be made public.
For example, some of our dealings with Sun and IBM and other corporations.

> I'm sure anyone who will participate to the Bay Area meeting would like to
> have access to it.

You and everyone else will have full access to the meeting where the
decision will be made. In fact, I expect you and others to come to it or at
least dial in.

Also, let me stress again, that the decision will be made in a public forum.
Thus, having the mailing list archives be opened up isn't necessarily useful
at this point. All of the conversations that have gone on, that are truly
important to this debate, have gone on here on this list.

-jon


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




Re: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Jon Stevens

on 1/13/01 12:58 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Given the PMC composition and the opinions expressed so far by some of the
> PMC members and the silence of the others, I'm sure you'll understand
> why I want to stop "beeing a party" of this project in general.

No, I think you don't want to be part of the project because the project
decided to go in one direction and you went in another without even
expressing your own vote (everyone else voted but you)!



> If anyone wants to "debate" with Jon  - good luck, I had
> enough of that already, and I have a feeling that even the subject of the
> debate is wrongly choosen - ( the PMC "reaching final decisions about
> the tomcat source" in 1/4 of an afternoon debate, instead of the project
> commiters ). 

You are talking about two different things in the same sentence.

#1. You are done debating with me.
#2. You now disagree with the PMC making this decision.

My reply:

#1. I'm also done debating with you. I already changed my votes to a +1.
Remember?

#2. You are now also disagreeing (right before the meeting) with the PMC
attempting to rectify the solution because we all (the active developers on
tomcat-dev) failed to come up with a solution on the mailing lists.

Therefore, I hear that you are now saying that you expect that your solution
is the one and only solution without giving any sort of comfort to the rest
of the people working on this project who are following the projects voted
on path.

> IMHO behaviors like Jon's should be the subject of the debate -

Now you would like to control my behavior? Who do you think you are?

> but it seems Jon is a PMC member and one of the organizers of the meeting.

How exactly am I an organizer? It was not me who suggested that the meeting
happen, it was James.

> ( in any case, I don't think I'm a "side" of any debate regarding tomcat -
> I just contributed code and time to a project and got flames back )

Either you are a bit more involved than you might think or you would like to
play off to everyone else that you aren't. Which is it?

thanks,

-jon


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




Patches and TC 4.1

2001-01-13 Thread Remy Maucherat

> David Weinrich wrote:
>
> Now that it's an Apache project, I am +1 for using it ... both here, and
as an
> implementation of org.apache.catalina.Logger for the general purpose
logging
> that goes on inside Catalina.

+1.
Will it be required to build ?

> I will be examining your patches (and Kief's work on session persistence)
over
> the weekend -- look for some commits and/or questions later on.

I was planning to do that, but as I already have a number of items in my
tasklist it would have taken a while before I applied them.

TC 4.1 should be running fine again. There are no known issues (even with
WebDAV) except an unimplemented call in the ServletContext.
The "old" Resources are now gone and replaced with JNDI DirContext. After a
few adjustements are made, the DefaultServlet / WebdavServlet should be able
to serve resources from any DirContext implementation (of course, if the
result of a lookup isn't the special wrapper type Resource or an input
stream, the string representation of the object will be served, which isn't
that useful).

The JARs which are in the /WEB-INF/lib directory in the webapp are still
loaded from the filesystem, which may or may not be a problem. Classes in
/WEB-INF/classes are correctly loaded through URLs. I know why this happen,
and there's no easy way around. One solution I found is providing a more
complete classloader for the webapps. I'll try to do that, see how good or
bad it turns out, and commit it if it works ok (it will be called
WebappClassLoader).

I'll probably do some clenup work in DefaultServlet and WebdavServlet next,
as the algorithms could be made more efficient (they were adapted for the
Resources' naming conventions, which were not the same as the JNDI naming
conventions).

I'd like to make a few proposals :
- Move the org.apache.naming package and subpackages, which is part of the
Catalina subproject right now, and make it an independent Tomcat subproject.
- Do the same for the org.apache.catalina.util package (and rename it
org.apache.tomcat.util).

Remy


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




Re: AccessLogUtil and minor patch to AccessLogValve

2001-01-13 Thread Jon Stevens

on 1/12/01 11:52 PM, "David Weinrich" <[EMAIL PROTECTED]> wrote:

> In diving through the documentation I found for log4j, and hitting the
> website I noticed...it is now part of the jakarta project (yay!). Seems like
> this would be a (much much much) better idea than my mostly-untested syslog
> code for an addition to the logger classes, any thoughts on this?
> 
> David Weinrich

+1. Use log4j.

-jon

-- 
Honk if you love peace and quiet.



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




Re: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread cmanolache

> I for one did not see continuing this discussion on tomcat dev as being
> productive.  It has continued on the PMC mailing list.
...
> The role of the PMC in such decisions will be a topic of discussion.  In
> fact, that is precisely the discussion that has continued in the PMC
> mailing list.

Of course, it would be nice to make the list archive available - since the
PMC is "deciding the future of tomcat" I guess commiters should at
least be able to read the debate.
( and have an example of "productive" debate - which is probably easier
when one side have the representation it has ).

I'm sure anyone who will participate to the Bay Area meeting would like to  
have access to it.

Costin



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




URGENT - jsp isn't working at all !!!!

2001-01-13 Thread Kim, KyoungA



I 've just installed Tomcat3.1 +Apache3.1.14 
on Solaris2.5.1(X86).
I could see http://localhost/Examples and Survlets 
Examples are working very well but JSP Examples are not working at 
all.
And there is one thing I feel strange 
is,
when I execute an JSP example and 
then Tomcat tries to generate a java file in $TOMCAT-HOME/work directory 
and
the jave file is being increased and it makes 
system full.(The jave file was almost 500 MB...)
So, I had to shutdown the tomcat and remove 
the jave file.(The other JSP files are same...)
 
For examples, 
This is the JSP file that I want to 
execute.
 
    <%@page import="java.util.Date"%>    
        The 
current time is <%= new Date().toString() %>    
    
 
This is the JAVA that tomcat made
 
import javax.servlet.*;import 
javax.servlet.http.*;import javax.servlet.jsp.*;import 
javax.servlet.jsp.tagext.*;import java.io.PrintWriter;import 
java.io.IOException;import java.io.FileInputStream;import 
java.io.ObjectInputStream;import java.util.Vector;import 
org.apache.jasper.runtime.*;import java.beans.*;import 
org.apache.jasper.JasperException;import java.util.Date;
 
public class 
_0002fsimpleJSP_0002ejspsimpleJSP_jsp_0 extends HttpJspBase {
 
    static 
{    }    public 
_0002fsimpleJSP_0002ejspsimpleJSP_jsp_0( ) {    
}
 
    private static boolean 
_jspx_inited = false;
 
    public final void 
_jspx_init() throws JasperException {    }
 
    public void 
_jspService(HttpServletRequest request, HttpServletResponse  
response)    throws IOException, 
ServletException {
 
    
JspFactory _jspxFactory = null;    
PageContext pageContext = null;    
HttpSession session = null;    
ServletContext application = null;    
ServletConfig config = null;    
JspWriter out = null;    Object page 
= this;    String  _value = 
null;    try {
 
    
if (_jspx_inited == false) 
{    
_jspx_init();    
_jspx_inited = 
true;    
}    
_jspxFactory = 
JspFactory.getDefaultFactory();    
response.setContentType("text/html;charset=8859_1");    
pageContext = _jspxFactory.getPageContext(this, request, 
response,    
"", true, 8192, true);
 
    
application = 
pageContext.getServletContext();    
config = 
pageContext.getServletConfig();    
session = 
pageContext.getSession();    
out = pageContext.getOut();
    
// HTML // begin 
[file="/home/jakarta-tomcat/webapps/JSPExamples/simpleJSP.jsp";from=(0,33);to=(3,20)]    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is ");
    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is "); 
    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");
    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is "); 
    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is ");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.write("\r\n\r\n\r\nThe current 
time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");    
out.write("\r\n\r\n\r\nThe current time is 
");            
    out.

Re: AccessLogUtil and minor patch to AccessLogValve

2001-01-13 Thread Craig R. McClanahan

David Weinrich wrote:

> In diving through the documentation I found for log4j, and hitting the
> website I noticed...it is now part of the jakarta project (yay!). Seems like
> this would be a (much much much) better idea than my mostly-untested syslog
> code for an addition to the logger classes, any thoughts on this?
>

Now that it's an Apache project, I am +1 for using it ... both here, and as an
implementation of org.apache.catalina.Logger for the general purpose logging
that goes on inside Catalina.

I will be examining your patches (and Kief's work on session persistence) over
the weekend -- look for some commits and/or questions later on.

>
> David Weinrich
>

Craig McClanahan



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




cvs commit: jakarta-tomcat-4.1/tester/src/tester/org/apache/tester SetBufferSize01.java

2001-01-13 Thread craigmcc

craigmcc01/01/13 14:31:34

  Modified:tester/src/tester/org/apache/tester SetBufferSize01.java
  Log:
  Port forward the revised setBufferSize() test.
  
  Revision  ChangesPath
  1.3   +5 -1  
jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java
  
  Index: SetBufferSize01.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetBufferSize01.java  2001/01/13 00:52:01 1.2
  +++ SetBufferSize01.java  2001/01/13 22:31:33 1.3
  @@ -68,7 +68,7 @@
* Negative test for ServletResponse.setBufferSize().
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/01/13 00:52:01 $
  + * @version $Revision: 1.3 $ $Date: 2001/01/13 22:31:33 $
*/
   
   public class SetBufferSize01 extends GenericServlet {
  @@ -93,10 +93,14 @@
   PrintWriter writer = response.getWriter();
   try {
   writer.print("SetBufferSize01 ");
  +response.flushBuffer();
   response.setBufferSize(100);
   writer.println("FAILED - Did not throw IllegalStateException");
   } catch (IllegalStateException e) {
   writer.println("PASSED");
  +} catch (IOException e) {
  +writer.println("FAILED - flushBuffer() threw IOException");
  +throw e;
   }
   while (true) {
   String message = StaticLogger.read();
  
  
  

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




cvs commit: jakarta-tomcat-4.0/tester/src/tester/org/apache/tester SetBufferSize01.java

2001-01-13 Thread craigmcc

craigmcc01/01/13 14:30:30

  Modified:tester/src/tester/org/apache/tester SetBufferSize01.java
  Log:
  Update the unit test version of the setBufferSize() test to catch the case
  that was previously failing.
  
  Revision  ChangesPath
  1.3   +5 -1  
jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/SetBufferSize01.java
  
  Index: SetBufferSize01.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/tester/src/tester/org/apache/tester/SetBufferSize01.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetBufferSize01.java  2001/01/13 00:51:01 1.2
  +++ SetBufferSize01.java  2001/01/13 22:30:30 1.3
  @@ -68,7 +68,7 @@
* Negative test for ServletResponse.setBufferSize().
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2001/01/13 00:51:01 $
  + * @version $Revision: 1.3 $ $Date: 2001/01/13 22:30:30 $
*/
   
   public class SetBufferSize01 extends GenericServlet {
  @@ -93,10 +93,14 @@
   PrintWriter writer = response.getWriter();
   try {
   writer.print("SetBufferSize01 ");
  +response.flushBuffer();
   response.setBufferSize(100);
   writer.println("FAILED - Did not throw IllegalStateException");
   } catch (IllegalStateException e) {
   writer.println("PASSED");
  +} catch (IOException e) {
  +writer.println("FAILED - flushBuffer() threw IOException");
  +throw e;
   }
   while (true) {
   String message = StaticLogger.read();
  
  
  

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




cvs commit: jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/connector ResponseBase.java

2001-01-13 Thread craigmcc

craigmcc01/01/13 14:29:44

  Modified:catalina/src/share/org/apache/catalina/connector
ResponseBase.java
  Log:
  Port forward the setBufferSize() bug fix from Tomcat 4.0.
  
  Revision  ChangesPath
  1.10  +5 -5  
jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/connector/ResponseBase.java
  
  Index: ResponseBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ResponseBase.java 2001/01/04 19:49:16 1.9
  +++ ResponseBase.java 2001/01/13 22:29:43 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
 1.9 2001/01/04 19:49:16 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/01/04 19:49:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
 1.10 2001/01/13 22:29:43 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/01/13 22:29:43 $
*
* 
*
  @@ -88,7 +88,7 @@
* the connector-specific methods need to be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/01/04 19:49:16 $
  + * @version $Revision: 1.10 $ $Date: 2001/01/13 22:29:43 $
*/
   
   public abstract class ResponseBase
  @@ -742,7 +742,7 @@
*/
   public void setBufferSize(int size) {
   
  - if (bufferCount > 0)
  + if (committed || (bufferCount > 0))
throw new IllegalStateException
(sm.getString("responseBase.setBufferSize.ise"));
   
  
  
  

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




cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector ResponseBase.java

2001-01-13 Thread craigmcc

craigmcc01/01/13 14:28:48

  Modified:catalina/src/share/org/apache/catalina/connector
ResponseBase.java
  Log:
  ServletResponse.setBufferSize() should throw IllegalStateException if any
  output has been written *or* the response has been committed.  Previously, it
  was only checking for the former case, so a setBufferSize() call immediately
  after a flushBuffer() call would not throw the exception.
  
  This was causing the CTS test ServletWrapperSetBufferSize_1Test to fail.
  
  Revision  ChangesPath
  1.10  +5 -5  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java
  
  Index: ResponseBase.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ResponseBase.java 2001/01/04 19:49:16 1.9
  +++ ResponseBase.java 2001/01/13 22:28:48 1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
 1.9 2001/01/04 19:49:16 remm Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/01/04 19:49:16 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/ResponseBase.java,v
 1.10 2001/01/13 22:28:48 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/01/13 22:28:48 $
*
* 
*
  @@ -88,7 +88,7 @@
* the connector-specific methods need to be implemented.
*
* @author Craig R. McClanahan
  - * @version $Revision: 1.9 $ $Date: 2001/01/04 19:49:16 $
  + * @version $Revision: 1.10 $ $Date: 2001/01/13 22:28:48 $
*/
   
   public abstract class ResponseBase
  @@ -742,7 +742,7 @@
*/
   public void setBufferSize(int size) {
   
  - if (bufferCount > 0)
  + if (committed || (bufferCount > 0))
throw new IllegalStateException
(sm.getString("responseBase.setBufferSize.ise"));
   
  
  
  

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




BugRat Report #744 was closed (apparently by: Ignacio Ortega)

2001-01-13 Thread BugRat Mail System

Report #744 was closed by Person #0

   Synopsis: security hole - can download jsp page source code

 (logged in as: Ignacio Ortega)

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




BugRat Report #743 was closed (apparently by: Ignacio Ortega)

2001-01-13 Thread BugRat Mail System

Report #743 was closed by Person #0

   Synopsis: request.getServerPort() reports wrong port with SSL (https)

 (logged in as: Ignacio Ortega)

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




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

2001-01-13 Thread remm

remm01/01/13 13:24:48

  Modified:catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java WebdavServlet.java
  Log:
  - Fixes all known issues with file serving and WebDAV.
  - COPY, MOVE, DELETE now work again.
  - All the resources served / browsed / written are now accessed
through JNDI. The initial DirContext itself is retrieved inside the naming
environment (java:/comp/Resources), or inside the ServletContext if
naming is disabled.
  - There are still some dependencies with Catalina, though : four classes from
the util package (which are already independent from Catalina), and one
constant from the Globals interface. It takes two minutes to remove them,
although I anticipate that these shared servlets will be moved to a separate
Tomcat subproject.
  
  Revision  ChangesPath
  1.21  +87 -36
jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- DefaultServlet.java   2001/01/13 05:20:05 1.20
  +++ DefaultServlet.java   2001/01/13 21:24:48 1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.20 2001/01/13 05:20:05 remm Exp $
  - * $Revision: 1.20 $
  - * $Date: 2001/01/13 05:20:05 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
 1.21 2001/01/13 21:24:48 remm Exp $
  + * $Revision: 1.21 $
  + * $Date: 2001/01/13 21:24:48 $
*
* 
*
  @@ -118,7 +118,7 @@
*
* @author Craig R. McClanahan
* @author Remy Maucherat
  - * @version $Revision: 1.20 $ $Date: 2001/01/13 05:20:05 $
  + * @version $Revision: 1.21 $ $Date: 2001/01/13 21:24:48 $
*/
   
   public class DefaultServlet
  @@ -444,7 +444,7 @@
   }
   
   // No, extract the desired path directly from the request
  -String result = request.getPathInfo();
  +String result = normalize(request.getPathInfo());
   if (result == null) {
   result = request.getServletPath();
   }
  @@ -818,6 +818,9 @@
*/
   protected String normalize(String path) {
   
  +if (path == null)
  +return null;
  +
String normalized = path;
   
// Resolve encoded characters in the normalized path,
  @@ -911,7 +914,7 @@
   IOException exception = null;
   
   // FIXME : i18n ?
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   InputStream istream = new BufferedInputStream
   (resourceInputStream, input);
   
  @@ -947,7 +950,7 @@
   
   IOException exception = null;
   
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   // FIXME : i18n ?
   Reader reader = new InputStreamReader(resourceInputStream);
   
  @@ -984,7 +987,7 @@
   
   IOException exception = null;
   
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   InputStream istream =
   new BufferedInputStream(resourceInputStream, input);
   exception = copyRange(istream, ostream, range.start, range.end);
  @@ -1019,7 +1022,7 @@
   
   IOException exception = null;
   
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   Reader reader = new InputStreamReader(resourceInputStream);
   exception = copyRange(reader, writer, range.start, range.end);
   
  @@ -1056,7 +1059,7 @@
   
   while ( (exception == null) && (ranges.hasMoreElements()) ) {
   
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   InputStream istream =// FIXME: internationalization???
   new BufferedInputStream(resourceInputStream, input);
   
  @@ -,7 +1114,7 @@
   
   while ( (exception == null) && (ranges.hasMoreElements()) ) {
   
  -InputStream resourceInputStream = resourceInfo.is;
  +InputStream resourceInputStream = resourceInfo.getStream();
   Reader reader = new InputStreamReader(resourceInputStream);
   
   

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

2001-01-13 Thread remm

remm01/01/13 13:19:13

  Modified:catalina/src/share/org/apache/naming/resources
ProxyDirContext.java Resource.java
ResourceAttributes.java
  Log:
  - ProxyDirContext is now way smarter about the types which are returned by
the actual DirContext. It will wrap an InputStream inside a Resource object,
as well as wrap generic attributes around ResourceAttributes.
  - Caching is still not implemented.
  
  Revision  ChangesPath
  1.2   +37 -16
jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java
  
  Index: ProxyDirContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ProxyDirContext.java  2001/01/10 04:46:49 1.1
  +++ ProxyDirContext.java  2001/01/13 21:19:12 1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
 1.1 2001/01/10 04:46:49 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/01/10 04:46:49 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
 1.2 2001/01/13 21:19:12 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/01/13 21:19:12 $
*
* 
*
  @@ -65,6 +65,7 @@
   package org.apache.naming.resources;
   
   import java.util.Hashtable;
  +import java.io.InputStream;
   import javax.naming.Context;
   import javax.naming.Name;
   import javax.naming.NameParser;
  @@ -81,7 +82,7 @@
* Proxy Directory Context implementation.
*
* @author Remy Maucherat
  - * @version $Revision: 1.1 $ $Date: 2001/01/10 04:46:49 $
  + * @version $Revision: 1.2 $ $Date: 2001/01/13 21:19:12 $
*/
   
   public class ProxyDirContext implements DirContext {
  @@ -145,10 +146,11 @@
*/
   public Object lookup(Name name)
   throws NamingException {
  -// Strip the URL header
  -// Find the appropriate NamingContext according to the current bindings
  -// Execute the lookup on that context
  -return dirContext.lookup(parseName(name));
  +Object object = dirContext.lookup(parseName(name));
  +if (object instanceof InputStream)
  +return new Resource((InputStream) object);
  +else
  +return object;
   }
   
   
  @@ -161,10 +163,11 @@
*/
   public Object lookup(String name)
   throws NamingException {
  -// Strip the URL header
  -// Find the appropriate NamingContext according to the current bindings
  -// Execute the lookup on that context
  -return dirContext.lookup(parseName(name));
  +Object object = dirContext.lookup(parseName(name));
  +if (object instanceof InputStream)
  +return new Resource((InputStream) object);
  +else
  +return object;
   }
   
   
  @@ -650,7 +653,11 @@
*/
   public Attributes getAttributes(Name name)
   throws NamingException {
  -return dirContext.getAttributes(parseName(name));
  +Attributes attributes = dirContext.getAttributes(parseName(name));
  +if (!(attributes instanceof ResourceAttributes)) {
  +attributes = new ResourceAttributes(attributes);
  +}
  +return attributes;
   }
   
   
  @@ -663,7 +670,11 @@
*/
   public Attributes getAttributes(String name)
   throws NamingException {
  -return dirContext.getAttributes(parseName(name));
  +Attributes attributes = dirContext.getAttributes(parseName(name));
  +if (!(attributes instanceof ResourceAttributes)) {
  +attributes = new ResourceAttributes(attributes);
  +}
  +return attributes;
   }
   
   
  @@ -681,7 +692,12 @@
*/
   public Attributes getAttributes(Name name, String[] attrIds)
   throws NamingException {
  -return dirContext.getAttributes(parseName(name), attrIds);
  +Attributes attributes = 
  +dirContext.getAttributes(parseName(name), attrIds);
  +if (!(attributes instanceof ResourceAttributes)) {
  +attributes = new ResourceAttributes(attributes);
  +}
  +return attributes;
   }
   
   
  @@ -697,7 +713,12 @@
*/
public Attributes getAttributes(String name, String[] attrIds)
throws NamingException {
  -return dirContext.getAttributes(parseName(name), attrIds);
  +Attributes attributes = 
  +dirContext.getAttributes(parseName(name), attrIds);
  +if (!(attributes instanceof ResourceAttributes)) {
  +attributes = new ResourceAttribu

cvs commit: jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources FileDirContext.java LocalStrings.properties

2001-01-13 Thread remm

remm01/01/13 13:17:06

  Modified:catalina/src/share/org/apache/naming/resources
FileDirContext.java LocalStrings.properties
  Log:
  - Implement the last three missing calls in the FileDirContext.
  - Fix a problem where a file was locked after doing a lookup. It now uses an
extended version of the resource class which only opens the stream to the
file when the stream is actually requested.
  
  Revision  ChangesPath
  1.4   +124 -26   
jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/FileDirContext.java
  
  Index: FileDirContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileDirContext.java   2001/01/13 05:15:55 1.3
  +++ FileDirContext.java   2001/01/13 21:17:05 1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
 1.3 2001/01/13 05:15:55 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/01/13 05:15:55 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.1/catalina/src/share/org/apache/naming/resources/FileDirContext.java,v
 1.4 2001/01/13 21:17:05 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/01/13 21:17:05 $
*
* 
*
  @@ -82,6 +82,7 @@
   import javax.naming.CompositeName;
   import javax.naming.NameParser;
   import javax.naming.OperationNotSupportedException;
  +import javax.naming.NameAlreadyBoundException;
   import javax.naming.directory.DirContext;
   import javax.naming.directory.Attributes;
   import javax.naming.directory.Attribute;
  @@ -97,7 +98,7 @@
* Filesystem Directory Context implementation helper class.
*
* @author Remy Maucherat
  - * @version $Revision: 1.3 $ $Date: 2001/01/13 05:15:55 $
  + * @version $Revision: 1.4 $ $Date: 2001/01/13 21:17:05 $
*/
   
   public class FileDirContext extends BaseDirContext {
  @@ -230,13 +231,7 @@
   tempContext.setDocBase(file.getPath());
   result = tempContext;
   } else {
  -try {
  -InputStream is = new FileInputStream(file);
  -result = new Resource(is);
  -} catch (FileNotFoundException e) {
  -throw new NamingException
  -(sm.getString("resources.notFound", name));
  -}
  +result = new FileResource(file);
   }
   
   return result;
  @@ -262,12 +257,14 @@
   throws NamingException {
   
   File file = file(name);
  -
  +
   if (file == null)
   throw new NamingException
   (sm.getString("resources.notFound", name));
   
  -file.delete();
  +if (!file.delete())
  +throw new NamingException
  +(sm.getString("resources.unbindFailed", name));
   
   }
   
  @@ -524,8 +521,16 @@
*/
   public void bind(String name, Object obj, Attributes attrs)
   throws NamingException {
  -// No custom attributes
  -// FIXME
  +
  +// Note: No custom attributes allowed
  +
  +File file = new File(base, name);
  +if (file.exists())
  +throw new NameAlreadyBoundException
  +(sm.getString("resources.alreadyBound", name));
  +
  +rebind(name, obj, attrs);
  +
   }
   
   
  @@ -549,8 +554,56 @@
*/
   public void rebind(String name, Object obj, Attributes attrs)
   throws NamingException {
  -// No custom attributes
  -// FIXME
  +
  +// Note: No custom attributes allowed
  +// Check obj type
  +
  +File file = new File(base, name);
  +
  +InputStream is = null;
  +if (obj instanceof Resource) {
  +try {
  +is = ((Resource) obj).streamContent();
  +} catch (IOException e) {
  +}
  +} else if (obj instanceof InputStream) {
  +is = (InputStream) obj;
  +} else if (obj instanceof DirContext) {
  +if (file.exists()) {
  +if (!file.delete())
  +throw new NamingException
  +(sm.getString("resources.bindFailed", name));
  +}
  +if (!file.mkdir())
  +throw new NamingException
  +(sm.getString("resources.bindFailed", name));
  +}
  +if (is == null)
  +throw new NamingException
  +(sm.getString("resources.bindFailed", name));
  +
  +// Open os
  +
  +try {
  +FileOutputStream os = new FileOutput

RE: [OFF TOPIC] HTML question

2001-01-13 Thread Marc Saegesser

Unfortunately, this means the string gets encoded twice which is just
wasteful considering all that's really needed is to escape the quote
character.

Also, the value may contain multibyte characters (Shift_JIS, for example)
and the JavaScript escape() function uses an encoding that is incompatible
with URL encodinig for multibyte characters so you end up having to write
the encoder from scratch is which seems wastefull again since I all that's
really needed to escape the damn quote character.

Anyone know of a good HTML mailing list?

> -Original Message-
> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 12, 2001 8:21 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [OFF TOPIC] HTML question
>
>
> on 1/12/01 6:12 PM, "Marc Saegesser" <[EMAIL PROTECTED]> wrote:
>
> > There must be something simple that I'm missing.
>
> URL encode it.
>
> -jon
>
> --
> Honk if you love peace and quiet.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


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




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/service/http HttpRequestAdapter.java

2001-01-13 Thread nacho

nacho   01/01/13 10:36:27

  Modified:src/share/org/apache/tomcat/service/http Tag: tomcat_32
HttpRequestAdapter.java
  Log:
  Bug Report #743
  request.getServerPort() reports wrong port with SSL (https)
  Submitted by Andreas Schildbach  [EMAIL PROTECTED]
  Patch by Dimitris Dinodimos [[EMAIL PROTECTED]]
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.16.2.6  +17 -15
jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/HttpRequestAdapter.java
  
  Index: HttpRequestAdapter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/HttpRequestAdapter.java,v
  retrieving revision 1.16.2.5
  retrieving revision 1.16.2.6
  diff -u -r1.16.2.5 -r1.16.2.6
  --- HttpRequestAdapter.java   2001/01/12 04:27:04 1.16.2.5
  +++ HttpRequestAdapter.java   2001/01/13 18:36:27 1.16.2.6
  @@ -247,21 +247,23 @@
   }
   
   public int getServerPort() {
  -if(serverPort == -1) {
  -//XXX Which is the default in case we can not get the port
  -//from the request??
  -serverPort=socket.getLocalPort();
  -String hostHeader = this.getHeader("host");
  -if (hostHeader != null) {
  -int i = hostHeader.indexOf(':');
  -if (i > -1) {
  -hostHeader = hostHeader.substring(i+1);
  -try{
  -serverPort=Integer.parseInt(hostHeader);
  -}catch(NumberFormatException pex){
  -}
  -}else serverPort=80;
  -}
  +if (serverPort != -1)
  +return serverPort;
  +String hostHeader = this.getHeader("host");
  +if (hostHeader == null)
  +serverPort = socket.getLocalPort();
  +else {
  +int i = hostHeader.indexOf(':');
  +if (i > -1) {
  +hostHeader = hostHeader.substring(i+1);
  +try {
  +serverPort = Integer.parseInt(hostHeader);
  +} catch (NumberFormatException pex) {
  +}
  +} else if (isSecure())
  +serverPort = 443;
  +else
  +serverPort = 80;
   }
   return serverPort;
   }
  
  
  

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




RE: An alternative to JSP

2001-01-13 Thread Paulo Gaspar

I used XSLT as a template mechanism and my feeling is that it is too heavy
and too problematic for that purpose. WebMacro, Velocity and FreeMarker
are less problematic and lighter.

I have seen people trying to use XSLT for business logic just because they
want to do everything with it, and they turned simple problems into very
complicated ones. Just take a look at the XSLT mailing list archives and
you too will have e good idea of what I am talking about.

With designers and "scripters", it gets even worse:
 - They can not use DreamWeaver and other visual design tools to
   manipulate the template;
 - They don't really understand the idea behind XSLT that affects many of
   its constructions (the stream of nodes thing and how transformations
   pipe those nodes);
 - They get lost with syntax issues all the time, even stumbling in things
   like the importance of the value in the "xmlns:xsl" property in the
   "xsl:stylesheet" tag, as in:
 http://www.w3.org/1999/XSL/Transform"
version="1.0">
   (If you change that value to what was used by Internet Explorer's
version of the MSXML parser, most other XSLT engines will do nothing
with it and MSXML3 will try using IE's XSLT dialect instead of the
standard.)


Now, this designers and scripters with a low level of sophistication are
very productive with simpler template mechanisms like WebMacro, Velocity
or Freemarker. And there are a lot more of them then full fledged
programmers.

We need the few full fledged programmers we have to work in the core
business logic instead of having them solving XSLT related issues.


OTOH, JSP's custom taglibs provide a mechanism to build simple dialects
that make those scripters that understand SQL (we have several)
productive on the simple logic that is necessary to build the data for
a report - and most of our dynamic pages are reports.

With taglibs for retrieving SQL data and applying a Velocity/WebMacro
template to it, one can do a lot.

With a caching taglib around JSP code which results can be cached, one
can do a lot working with a lot of performance.


For me, this is just a real world scenario.


Have fun,
Paulo Gaspar

> -Original Message-
> From: Nick Bauman [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 02:23
>
> Somewhat unrelated, I hear a lot of people going gaga over XSLT for web
> development. I understand the desire: a single document represents the
> data of the page, while other documents are used to convert that data for
> different clients / views with an emphasis on content seperation from
> presentation logic.
>
> But AFAIK, this is only 1/2 the battle. I still have business logic which
> cannot be handled in the XSLT code. Add the amount of work just to get the
> presentation away from the content in a standards-compliant fashion
> (work in both a human and a computer terms) isn't worth it unless, say, I
> was going to implement web, WAP and Palm OS views for the Library of
> Congress or the Human Genome Project. But all that just for Acme Widgets,
> who has, at the most, 2000 products.
>
> Kinda like using the Space Shuttle to go grocery shopping.
>


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




RE: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Paulo Gaspar

All the posting was very wise and balanced, as usual with Sam.
I think that the sentence I kept in this reply is a key one. 

I hope that Costin will end up defending his right to pursue his 
convictions, even if his ideas are not so popular now.

I hope that other people will remember the advantages of diversity.

Catalina was not main stream all the time, was it?


Have fun,
Paulo


> -Original Message-
> From: Sam Ruby [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, January 13, 2001 13:38
> 
> 
> The right of committers to pursue their convictions, independent of the
> popularity of their ideas at the time, is an important "side" of the
> debate.
> 
> - Sam Ruby


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




cvs commit: jakarta-tomcat/src/doc faq

2001-01-13 Thread jiricka

jiricka 01/01/13 06:11:10

  Modified:src/doc  Tag: tomcat_32 faq
  Log:
  Updating a DD code example to reflect repackaging of the JspServlet class.
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.4.2   +1 -1  jakarta-tomcat/src/doc/faq
  
  Index: faq
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/doc/faq,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- faq   2001/01/13 01:12:22 1.1.4.1
  +++ faq   2001/01/13 14:11:09 1.1.4.2
  @@ -225,7 +225,7 @@
 jsp
 
 
  -  org.apache.jasper.runtime.JspServlet
  +  org.apache.jasper.servlet.JspServlet
 
 
 
  
  
  

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




Re: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread Sam Ruby

Costin Manolache wrote:
>
> Given the PMC composition and the opinions expressed so far
> by some of the PMC members and the silence of the others,
> I'm sure you'll understand why I want to stop "beeing a party"
> of this project in general.

I for one did not see continuing this discussion on tomcat dev as being
productive.  It has continued on the PMC mailing list.

> If anyone wants to "debate" with Jon  - good luck, I had
> enough of that already, and I have a feeling that even the
> subject of the debate is wrongly choosen - ( the PMC "reaching
> final decisions about the tomcat source" in 1/4 of an
> afternoon debate, instead of the project commiters ).

The role of the PMC in such decisions will be a topic of discussion.  In
fact, that is precisely the discussion that has continued in the PMC
mailing list.

Some feel that the decision was already made by the Tomcat committers.

> IMHO behaviors like Jon's should be the subject of the
> debate - but it seems Jon is a PMC member and one of the
> organizers of the meeting.

Jon has strong opinions, and voiced then in an unambiguous fashion.  When
asked to defer, he did.  Flames are a fact of life in open source.

> ( in any case, I don't think I'm a "side" of any debate
> regarding tomcat - I just contributed code and time to a
> project and got flames back )

The right of committers to pursue their convictions, independent of the
popularity of their ideas at the time, is an important "side" of the
debate.

- Sam Ruby


[EMAIL PROTECTED] on 01/13/2001 03:58:41 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:   [EMAIL PROTECTED]
Subject:  Re: FW: Jakarta PMC Meeting Agenda / Info



>*) Tomcat 3.x vs. Tomcat 4.x. We will be reaching a final decision
>about the future of the Tomcat source base and what our process
>for managing the factors that created the current situation will
>be moving forward. For reference you may want to read:
>
>http://www.x180.net/Mutterings/Apache/rules.html
>
>The Chairman hereby requests that parties from both sides of this
>debate be present at this meeting to discuss.

Given the PMC composition and the opinions expressed so far by some of the
PMC members and the silence of the others, I'm sure you'll understand
why I want to stop "beeing a party" of this project in general.

If anyone wants to "debate" with Jon  - good luck, I had
enough of that already, and I have a feeling that even the subject of the
debate is wrongly choosen - ( the PMC "reaching final decisions about
the tomcat source" in 1/4 of an afternoon debate, instead of the project
commiters ).

IMHO behaviors like Jon's should be the subject of the debate - but it
seems Jon is a PMC member and one of the organizers of the meeting.

( in any case, I don't think I'm a "side" of any debate regarding tomcat -
I just contributed code and time to a project and got flames back )

Costin



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




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




[PATCH] for Bug report 743

2001-01-13 Thread Dimitris Dinodimos



Hello,
 
There are two more bugs (report 741 and 744) that I 
would like to be fixed in version 3.2.2
Does anyone work on these bugs? If no one works on 
them I could try to fix them this weekend.
Can you please let me know.
 
Thank you very much,
Dimitris Dinodimos
 

Index: HttpRequestAdapter.java
===
RCS file: 
/home/cvspublic/jakarta-tomcat/src/share/org/apache/tomcat/service/http/Attic/HttpRequestAdapter.java,v
retrieving revision 1.16.2.5
diff -u -r1.16.2.5 HttpRequestAdapter.java
--- HttpRequestAdapter.java 2001/01/12 04:27:04 1.16.2.5
+++ HttpRequestAdapter.java 2001/01/13 10:11:09
@@ -247,21 +247,23 @@
 }
 
 public int getServerPort() {
-if(serverPort == -1) {
-//XXX Which is the default in case we can not get the port
-//from the request??
-serverPort=socket.getLocalPort();
-String hostHeader = this.getHeader("host");
-if (hostHeader != null) {
-int i = hostHeader.indexOf(':');
-if (i > -1) {
-hostHeader = hostHeader.substring(i+1);
-try{
-serverPort=Integer.parseInt(hostHeader);
-}catch(NumberFormatException pex){
-}
-}else serverPort=80;
-}
+if (serverPort != -1)
+return serverPort;
+String hostHeader = this.getHeader("host");
+if (hostHeader == null)
+serverPort = socket.getLocalPort();
+else {
+int i = hostHeader.indexOf(':');
+if (i > -1) {
+hostHeader = hostHeader.substring(i+1);
+try {
+serverPort = Integer.parseInt(hostHeader);
+} catch (NumberFormatException pex) {
+}
+} else if (isSecure())
+serverPort = 443;
+else
+serverPort = 80;
 }
 return serverPort;
 }



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


Re: Any solution for bug#696?

2001-01-13 Thread Arshad Mahmood

Hi,

I have downloaded the latest tomcat-4.0-b1 binaries and have been trying to
get it working on with Apache 1.3.12.

1. Apache 1.3.12 complains that the mod_webapp.so in the linux directory was
not compiled with -DEAPI and may crash. I rebuilt it from the source and
this error went away.

2. When I try and use catalina via apache I get a error (-2) cannot connect
to localhost (127.0.0.1). The ServerName in my httpd.conf is 'localhost' and
as far as I can tell no changes need to be made to the server.xml.

3. Does anybody know how the ROOT context can be served via apache. Apache
keeps complaining that another web application has already been registered
for '/'.

Regards,
Arshad


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




Re: FW: Jakarta PMC Meeting Agenda / Info

2001-01-13 Thread cmanolache

>*) Tomcat 3.x vs. Tomcat 4.x. We will be reaching a final decision
>about the future of the Tomcat source base and what our process
>for managing the factors that created the current situation will
>be moving forward. For reference you may want to read:
>
>http://www.x180.net/Mutterings/Apache/rules.html
>
>The Chairman hereby requests that parties from both sides of this
>debate be present at this meeting to discuss.

Given the PMC composition and the opinions expressed so far by some of the
PMC members and the silence of the others, I'm sure you'll understand
why I want to stop "beeing a party" of this project in general. 

If anyone wants to "debate" with Jon  - good luck, I had
enough of that already, and I have a feeling that even the subject of the
debate is wrongly choosen - ( the PMC "reaching final decisions about
the tomcat source" in 1/4 of an afternoon debate, instead of the project
commiters ). 

IMHO behaviors like Jon's should be the subject of the debate - but it
seems Jon is a PMC member and one of the organizers of the meeting. 

( in any case, I don't think I'm a "side" of any debate regarding tomcat -
I just contributed code and time to a project and got flames back )

Costin



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