cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves PersistentValve.java

2002-11-29 Thread jfclere
jfclere 2002/11/29 00:30:44

  Added:   catalina/src/share/org/apache/catalina/valves
PersistentValve.java
  Log:
  The idea is to share Sessions between different Tomcats.
  
  Revision  ChangesPath
  1.1  
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/PersistentValve.java
  
  Index: PersistentValve.java
  ===
  /*
   * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/PersistentValve.java,v
 1.1 2002/11/29 08:30:44 jfclere Exp $
   * $Revision: 1.1 $
   * $Date: 2002/11/29 08:30:44 $
   *
   * 
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * 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.catalina.valves;
  
  
  import java.io.IOException;
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import javax.servlet.http.HttpSession;
  
  import org.apache.catalina.Container;
  import org.apache.catalina.Context;
  import org.apache.catalina.Manager;
  import org.apache.catalina.Request;
  import org.apache.catalina.Response;
  import org.apache.catalina.Session;
  import org.apache.catalina.ValveContext;
  import org.apache.catalina.util.StringManager;
  import org.apache.catalina.valves.ValveBase;
  import org.apache.catalina.Logger;
  import org.apache.catalina.core.StandardHost;
  import org.apache.catalina.Store;
  import org.apache.catalina.session.PersistentManager;
  import org.apache.catalina.session.ManagerBase;
  
  
  /**
   * Valve that implements the default basic behavior for the
   * codeStandardHost/code container implementation.
   * p
   * bUSAGE CONSTRAINT/b: To work correctly it requires a  PersistentManager.
   *
   * @author Jean-Frederic Clere
   * @version $Revision: 1.1 $ $Date: 2002/11/29 08:30:44 $
   */
  
  public class PersistentValve
  extends ValveBase {
  
  
  // - Instance Variables
  
  
  /**
   * The descriptive information related to this implementation.
   */
  private static final String info =
  

Modify Jasper compiler input???

2002-11-29 Thread Tom Fennelly
Hi,

Being a newbie to this mailing list, I hope I don't upset anyone!!

What I'm trying to figure out is:
Are there any hooks in Jasper that would allow manipulation of its internal 
representation of the JSP page prior to compilation?

I.e modify compiler input.

Simple example:
=== Source JSP 
html
	body
		Hello World!!
	/body
/html
= JSP Compiler Input =
...some useragent eval code...
% if(useragent == HTML) { %
	html
		body
			Hello World!!
		/body
	/html
% } else if(useragent == WML) { %
	wml
		card
			p
Hello World!!
			/p
		/card
	/wml
% } %
=

Having had a look at the code I don't see any mechanism to do this but maybe 
I'm looking in the wrong place.  I would have expected to see the likes of 
this in around org.apache.jasper.compiler.Compiler.generateJava().  It 
parses the JSP to a org.apache.jasper.compiler.Node.Nodes model - this seems 
like the structure I'd need access to (???).

Perhaps this is Heresy in terms of JSP/Servlet spec conformance, I'm 
probably not informed enough.  Hope someone can help.

Regards,

Tom Fennelly.






_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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



Re: Modify Jasper compiler input??? (tomcat 4.1.12)

2002-11-29 Thread Tom Fennelly
I'm very sorry - Tomcat version 4.1.12



From: Tom Fennelly [EMAIL PROTECTED]
Reply-To: Tomcat Developers List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Modify Jasper compiler input???
Date: Fri, 29 Nov 2002 08:31:23 +

Hi,

Being a newbie to this mailing list, I hope I don't upset anyone!!

What I'm trying to figure out is:
Are there any hooks in Jasper that would allow manipulation of its internal 
representation of the JSP page prior to compilation?

I.e modify compiler input.

Simple example:
=== Source JSP 
html
	body
		Hello World!!
	/body
/html
= JSP Compiler Input =
...some useragent eval code...
% if(useragent == HTML) { %
	html
		body
			Hello World!!
		/body
	/html
% } else if(useragent == WML) { %
	wml
		card
			p
Hello World!!
			/p
		/card
	/wml
% } %
=

Having had a look at the code I don't see any mechanism to do this but 
maybe I'm looking in the wrong place.  I would have expected to see the 
likes of this in around org.apache.jasper.compiler.Compiler.generateJava(). 
 It parses the JSP to a org.apache.jasper.compiler.Node.Nodes model - this 
seems like the structure I'd need access to (???).

Perhaps this is Heresy in terms of JSP/Servlet spec conformance, I'm 
probably not informed enough.  Hope someone can help.

Regards,

Tom Fennelly.






_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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


_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


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



Re: mod_jk-2.0.42.so

2002-11-29 Thread Henri Gomez
Pier Fumagalli wrote:

On 28/11/02 7:37 pm, in article 000701c2970d$2d408f90$[EMAIL PROTECTED],
Pedro Igor Craveiro e Silva [EMAIL PROTECTED] wrote:



Ok.
But, with that first module(mod_jk2.(etc)) the i was using i can put the
apache e tomcat together?



FreeBSD contains a Linux emulator, but AFAICR, it ships currently with
GLIBC-5 ... You'd better off recompiling the module (Apache part) native for
FreeBSD and the JNI lib for Linux GLIBC-5...


+1

Prefer a native port or install Apache 2.0.43 for FreeBSD...





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




tomcat appache request parameters getting lost

2002-11-29 Thread M
Hi,

I'm using apache 1.3.26 with the mod_jk connector to tomcat 4.1.12

The below jsp includes a servet which is unable to access the parameters
on the request url e.g.  http://host.net/testInclude.jsp?test=test
Removing a line from the test comment or changing the flush=true to
flush=false can both make it work, but I don't understand why.
It does seem to be very buffer related and very dependant on size of
text before the include.
This problem only occurs when using tomcat through apache and is not
reproducible with tomcat alone.
 

The below page id 778 bytes:

%@ page language=java session=true %
html
head
  titleAccess Reports/title

!--
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
test test test test test test test test test test test test test
--



/head
body

jsp:include page=/servlet/testIncludeServlet flush=true 
  jsp:param name=depth value=summary /
/jsp:include

/body
/html


-- 
Regards,
M

Martin Sillence
PR Newswire

DL +44 (0)1865 78 5065
F  +44 (0)1865 78 5100
W  www.prnewswire.eu.com
---
Any views or opinions are solely those of the author and do not
necessarily represent those of PR Newswire Europe. The e-mail
contents are intended only for addressee and may contain
confidential and/or privileged material. If you are not the
intended recipient, please do not read, copy, use or disclose
this communication and notify the sender.

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




[4.1.16] [VOTE] Stability rating

2002-11-29 Thread Remy Maucherat
Note: I know many people are away this weekend, so this vote will run 
until Monday COB (on the west coast), which more or less means Tuesday 
morning GMT.

ballot
[ ] Alpha
[ ] Beta
[ ] Stable (aka GA)
/ballot

Remy


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



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

2002-11-29 Thread remm
remm2002/11/29 06:44:15

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Always set configFile, so that Context information is never saved in server.xml
(which I think is very hard to work with, and cannot be reloaded).
  
  Revision  ChangesPath
  1.10  +34 -4 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardContext.java  23 Oct 2002 19:57:30 -  1.9
  +++ StandardContext.java  29 Nov 2002 14:44:15 -  1.10
  @@ -3596,6 +3596,18 @@
   setConfigured(false);
   boolean ok = true;
   
  +// Set config file name
  +if (getConfigFile() == null) {
  +String appBase = getAppBase();
  +String name = getName();
  +if (name.equals()) {
  +name = ROOT;
  +}
  +File file = new File(appBase);
  +file = new File(file, name + .xml);
  +setConfigFile(file.getPath());
  +}
  +
   // Add missing components as necessary
   if (webappResources == null) {   // (1) Required by Loader
   if (debug = 1)
  @@ -4055,6 +4067,24 @@
   }
   }
   return docBase;
  +}
  +
  +
  +/**
  + * Get app base.
  + */
  +private String getAppBase() {
  +String appBase = null;
  +Container container = this;
  +while (container != null) {
  +if (container instanceof Host)
  +break;
  +container = container.getParent();
  +}
  +if (container != null) {
  +appBase = ((Host) container).getAppBase();
  +}
  +return appBase;
   }
   
   
  
  
  

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




cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java

2002-11-29 Thread remm
remm2002/11/29 06:46:02

  Modified:catalina/src/share/org/apache/catalina/startup
HostConfig.java
  Log:
  - Add reloading for the context XML files.
  - I plan to port the last two patches to the 4.1 branch. Please let me know
if it's not ok.
  
  Revision  ChangesPath
  1.5   +52 -15
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java
  
  Index: HostConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HostConfig.java   11 Sep 2002 13:08:19 -  1.4
  +++ HostConfig.java   29 Nov 2002 14:46:02 -  1.5
  @@ -202,16 +202,24 @@
*/
   private HashMap webXmlLastModified = new HashMap();
   
  +
  +/**
  + * Last modified dates of the Context xml files of the contexts, keyed by
  + * context name.
  + */
  +private HashMap contextXmlLastModified = new HashMap();
  +
  +
   /**
* Attribute value used to turn on/off XML validation
*/
  - private boolean xmlValidation = false;
  +private boolean xmlValidation = false;
   
   
   /**
* Attribute value used to turn on/off XML namespace awarenes.
*/
  - private boolean xmlNamespaceAware = false;
  +private boolean xmlNamespaceAware = false;
   
   
   // - Properties
  @@ -638,7 +646,7 @@
   /**
* Check deployment descriptors last modified date.
*/
  -protected void checkWebXmlLastModified() {
  +protected void checkContextLastModified() {
   
   if (!(host instanceof Deployer))
   return;
  @@ -673,24 +681,53 @@
   } else {
   if (lastModified.longValue() != newLastModified) {
   webXmlLastModified.remove(contextName);
  -((Lifecycle) context).stop();
  -// Note: If the context was already stopped, a 
  -// Lifecycle exception will be thrown, and the context
  -// won't be restarted
  -((Lifecycle) context).start();
  +restartContext(context);
   }
   }
  -} catch (LifecycleException e) {
  -; // Ignore
   } catch (NamingException e) {
   ; // Ignore
   }
   
  +Long lastModified = (Long) contextXmlLastModified.get(contextName);
  +String configFileName = context.getConfigFile();
  +if (configFileName != null) {
  +File configFile = new File(configFileName);
  +if (!configFile.isAbsolute()) {
  +configFile = new File(System.getProperty(catalina.base),
  +  configFile.getPath());
  +}
  +long newLastModified = configFile.lastModified();
  +if (lastModified == null) {
  +contextXmlLastModified.put
  +(contextName, new Long(newLastModified));
  +} else {
  +if (lastModified.longValue() != newLastModified) {
  +contextXmlLastModified.remove(contextName);
  +restartContext(context);
  +}
  +}
  +}
  +
   }
   
   }
   
   
  +protected boolean restartContext(Context context) {
  +log.info(restartContext( + context.getName() + ));
  +boolean result = true;
  +try {
  +((Lifecycle) context).stop();
  +// Note: If the context was already stopped, a 
  +// Lifecycle exception will be thrown, and the context
  +// won't be restarted
  +((Lifecycle) context).start();
  +} catch (LifecycleException e) {
  +result = false;
  +}
  +return result;
  +}
  +
   
   /**
* Expand the WAR file found at the specified URL into an unpacked
  @@ -1063,7 +1100,7 @@
   deployApps();
   
   // Check for web.xml modification
  -checkWebXmlLastModified();
  +checkContextLastModified();
   
   }
   
  
  
  

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




Re: [4.1.16] [VOTE] Stability rating

2002-11-29 Thread jean-frederic clere
Remy Maucherat wrote:

Note: I know many people are away this weekend,


The lists are very _quiet_


so this vote will run 
until Monday COB (on the west coast), which more or less means Tuesday 
morning GMT.

ballot
[ ] Alpha
[ ] Beta
[ ] Stable (aka GA)
/ballot

Remy


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






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




DO NOT REPLY [Bug 14967] New: - Servet dies when very long request headers are encountered

2002-11-29 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=14967.
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=14967

Servet dies when very long request headers are encountered

   Summary: Servet dies when very long request headers are
encountered
   Product: Tomcat 3
   Version: 3.3.1 Final
  Platform: PC
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Servlet
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


java.lang.StringIndexOutOfBoundsException: length must be = 0
at java.lang.String.init(String.java:362)
at java.lang.String.init(String.java:411)
at org.apache.tomcat.util.buf.ByteChunk.toString(ByteChunk.java:419)
at org.apache.tomcat.util.buf.MessageBytes.toString
(MessageBytes.java:199)
at org.apache.tomcat.util.http.MimeHeaders.getHeader
(MimeHeaders.java:334)
at org.apache.tomcat.core.Request.getHeader(Request.java:903)
at org.apache.tomcat.facade.HttpServletRequestFacade.getHeader
(HttpServletRequestFacade.java:231)
at javax.servlet.http.HttpServlet.doTrace(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)

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




DO NOT REPLY [Bug 14967] - Servet dies when very long request headers are encountered

2002-11-29 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=14967.
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=14967

Servet dies when very long request headers are encountered





--- Additional Comments From [EMAIL PROTECTED]  2002-11-29 18:51 ---
The exact length varies, but effects seem to start around 15K. On the other 
hand, Tomcat 4 and Apache httpd seem to limit the max. length to 8K (returning 
a response status of 400).

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




set enviroment variables on linux

2002-11-29 Thread Jack_-_Ganzha
How can i set a enviroment variable on linux using kde interface?



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