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

2003-06-15 Thread remm
remm2003/06/15 00:09:10

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - The context needs to be registered in JMX before starting the pipeline.
Otherwise, the valves will not get unregistered properly when undeploying.
  - I hope this does not cause other problems, but a fix was clearly needed.
  
  Revision  ChangesPath
  1.64  +29 -7 
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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- StandardContext.java  29 May 2003 04:13:24 -  1.63
  +++ StandardContext.java  15 Jun 2003 07:09:10 -  1.64
  @@ -3867,7 +3867,7 @@
   
   // Set config file name
   String appBase = getAppBase();
  -if (getConfigFile() == null  appBase != null) {
  +if ((getConfigFile() == null)  (appBase != null)) {
   
   String name = getName();
   if (name.equals()) {
  @@ -4020,6 +4020,9 @@
   // Initialize associated mapper
   mapper.setContext(getPath(), welcomeFiles, resources);
   
  +// JMX registration
  +registerJMX();
  +
   // Start our child containers, if any
   Container children[] = findChildren();
   for (int i = 0; i  children.length; i++) {
  @@ -4128,12 +4131,20 @@
   }
   setAvailable(false);
   }
  -registerJMX();
  +
  +// Wrappers JMX registration
  +registerWrappersJMX();
   
   // Notify our interested LifecycleListeners
   lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
   startTime=System.currentTimeMillis();
  -
  +
  +// Close all JARs right away to avoid always opening a peak number 
  +// of files on startup
  +if (getLoader() instanceof WebappLoader) {
  +((WebappLoader) getLoader()).closeJARs(true);
  +}
  +
   //cacheContext();
   }
   
  @@ -4363,10 +4374,13 @@
   ((StandardManager) getManager()).processExpires();
   }
   
  -if (reloadable  (getLoader() != null)) {
  -if (getLoader().modified()) {
  +if (getLoader() != null) {
  +if (reloadable  (getLoader().modified())) {
   reload();
   }
  +if (getLoader() instanceof WebappLoader) {
  +((WebappLoader) getLoader()).closeJARs(false);
  +}
   }
   
   }
  @@ -5007,13 +5021,21 @@
   Registry.getRegistry().registerComponent(this,oname, null);
   }
   }
  +} catch( Exception ex ) {
  +log.info(Error registering ctx with jmx  + this +   +
  +oname +   + ex.toString(), ex );
  +}
  +}
  +
  +private void registerWrappersJMX() {
  +try {
   for( Iterator it=wrappers.iterator(); it.hasNext() ; ) {
   StandardWrapper wrapper=(StandardWrapper)it.next();
   // XXX prevent duplicated registration
   wrapper.registerJMX( this );
   }
   } catch( Exception ex ) {
  -log.info(Error registering ctx with jmx  + this +   +
  +log.info(Error registering wrapper with jmx  + this +   +
   oname +   + ex.toString(), ex );
   }
   }
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 00:10:28

  Modified:catalina/src/share/org/apache/catalina/core
NamingContextListener.java
  Log:
  - Address bug 20758.
  - One unbind context was missing.
  
  Revision  ChangesPath
  1.3   +5 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/NamingContextListener.java
  
  Index: NamingContextListener.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/NamingContextListener.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- NamingContextListener.java21 Jan 2003 00:38:27 -  1.2
  +++ NamingContextListener.java15 Jun 2003 07:10:28 -  1.3
  @@ -331,6 +331,7 @@
   
   // Setting the context in read/write mode
   ContextAccessController.setWritable(getName(), container);
  +ContextBindings.unbindContext(container, container);
   
   if (container instanceof Context) {
   ContextBindings.unbindClassLoader
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader WebappClassLoader.java WebappLoader.java

2003-06-15 Thread remm
remm2003/06/15 00:22:16

  Modified:catalina/src/share/org/apache/catalina/loader
WebappClassLoader.java WebappLoader.java
  Log:
  - Add a machanism to release JAR objects periodically.
  - This should decrease classloading performance because of a big sync block
during JAR access, but lookup of previously loaded class will behave the same as 
before.
  - Add a workaround for JAR locking with XML processing and getResource.
If the resource was loaded from a JAR, it will be extracted as needed to the
work directory.
  
  Revision  ChangesPath
  1.17  +163 -59   
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- WebappClassLoader.java12 Jun 2003 22:02:12 -  1.16
  +++ WebappClassLoader.java15 Jun 2003 07:22:16 -  1.17
  @@ -61,6 +61,7 @@
   package org.apache.catalina.loader;
   
   import java.io.File;
  +import java.io.FileOutputStream;
   import java.io.FilePermission;
   import java.io.InputStream;
   import java.io.ByteArrayInputStream;
  @@ -285,6 +286,12 @@
   
   
   /**
  + * Last time a JAR was accessed.
  + */
  +protected long lastJarAccessed = 0L;
  +
  +
  +/**
* The list of local repositories, in the order they should be searched
* for locally loaded classes or resources.
*/
  @@ -348,6 +355,12 @@
   
   
   /**
  + * Path where resources loaded from JARs will be extracted.
  + */
  +private File loaderDir = null;
  +
  +
  +/**
* The PermissionCollection for each CodeSource for a web
* application context.
*/
  @@ -534,6 +547,14 @@
   }
   
   
  +/**
  + * Change the work directory.
  + */
  +public void setWorkDir(File workDir) {
  +this.loaderDir = new File(workDir, loader);
  +}
  +
  +
   // --- Reloader Methods
   
   
  @@ -977,15 +998,18 @@
   }
   
   // Looking at the JAR files
  -for (i = 0; i  jarFilesLength; i++) {
  -JarEntry jarEntry = jarFiles[i].getJarEntry(name);
  -if (jarEntry != null) {
  -try {
  -String jarFakeUrl = getURI(jarRealFiles[i]).toString();
  -jarFakeUrl = jar: + jarFakeUrl + !/ + name;
  -result.addElement(new URL(jarFakeUrl));
  -} catch (MalformedURLException e) {
  -// Ignore
  +synchronized (jarFiles) {
  +openJARs();
  +for (i = 0; i  jarFilesLength; i++) {
  +JarEntry jarEntry = jarFiles[i].getJarEntry(name);
  +if (jarEntry != null) {
  +try {
  +String jarFakeUrl = getURI(jarRealFiles[i]).toString();
  +jarFakeUrl = jar: + jarFakeUrl + !/ + name;
  +result.addElement(new URL(jarFakeUrl));
  +} catch (MalformedURLException e) {
  +// Ignore
  +}
   }
   }
   }
  @@ -1052,6 +1076,33 @@
   // (2) Search local repositories
   url = findResource(name);
   if (url != null) {
  +// Locating the repository for special handling in the case 
  +// of a JAR
  +ResourceEntry entry = (ResourceEntry) resourceEntries.get(name);
  +FileOutputStream os = null;
  +try {
  +String repository = entry.codeBase.toString();
  +if (repository.endsWith(.jar)) {
  +// Copy binary content to the work directory if not present
  +File resourceFile = new File(loaderDir, name);
  +if (entry.lastModified  resourceFile.lastModified()) {
  +resourceFile.getParentFile().mkdirs();
  +os = new FileOutputStream(resourceFile);
  +os.write(entry.binaryContent);
  +}
  +url = resourceFile.toURL();
  +}
  +} catch (Exception e) {
  +// Ignore
  +e.printStackTrace();
  +} finally {
  +if (os != null) {
  +try {
  +os.close();
  +} catch (IOException ex) {
  +}
  +}
  +}
   if (log.isDebugEnabled())
   log.debug(  -- Returning ' + url.toString() + ');
   return (url);
  

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

2003-06-15 Thread remm
remm2003/06/15 00:41:12

  Modified:catalina/src/share/org/apache/catalina/startup
ContextConfig.java TldConfig.java
  Log:
  - Address bug 20758.
  - Cleanup digester after processing.
  
  Revision  ChangesPath
  1.27  +3 -5  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
  
  Index: ContextConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/ContextConfig.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ContextConfig.java6 Jun 2003 02:46:41 -   1.26
  +++ ContextConfig.java15 Jun 2003 07:41:12 -  1.27
  @@ -309,14 +309,11 @@
   if( url!=null ) {
   InputSource is = new InputSource(url.toExternalForm());
   is.setByteStream(stream);
  +webDigester.clear();
   webDigester.setDebug(getDebug());
   if (context instanceof StandardContext) {
   ((StandardContext) context).setReplaceWelcomeFiles(true);
   }
  -webDigester.clear();
  -//ClassLoader cl=Thread.currentThread().getContextClassLoader();
  -//if( cl!=null )
  -//webDigester.setClassLoader(cl);
   webDigester.setUseContextClassLoader(true);
   webDigester.push(context);
   webDigester.parse(is);
  @@ -340,6 +337,7 @@
   } catch (IOException e) {
   log.error(sm.getString(contextConfig.applicationClose), e);
   }
  +webDigester.push(null);
   }
   }
   webRuleSet.recycle();
  
  
  
  1.12  +7 -3  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java
  
  Index: TldConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/TldConfig.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TldConfig.java12 Jun 2003 22:41:19 -  1.11
  +++ TldConfig.java15 Jun 2003 07:41:12 -  1.12
  @@ -533,9 +533,13 @@
   }
   
   synchronized (tldDigester) {
  -tldDigester.clear();
  -tldDigester.push(this);
  -tldDigester.parse(resourceStream);
  +try {
  +tldDigester.push(this);
  +tldDigester.parse(resourceStream);
  +} finally {
  +tldDigester.push(null);
  +tldDigester.clear();
  +}
   }
   
   }
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 00:41:56

  Modified:catalina/src/share/org/apache/catalina/startup
HostConfig.java
  Log:
  - Better handling for webapps which have been undeployed through the
manager.
  
  Revision  ChangesPath
  1.13  +11 -7 
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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- HostConfig.java   10 Jun 2003 20:15:35 -  1.12
  +++ HostConfig.java   15 Jun 2003 07:41:56 -  1.13
  @@ -706,10 +706,11 @@
   if (files[i].endsWith(.war)) {
   File dir = new File(appBase, files[i]);
   Long lastModified = (Long) warLastModified.get(files[i]);
  +long dirLastModified = dir.lastModified();
   if (lastModified == null) {
   warLastModified.put
   (files[i], new Long(dir.lastModified()));
  -} else if (dir.lastModified()  lastModified.longValue()) {
  +} else if (dirLastModified  lastModified.longValue()) {
   // The WAR has been modified: redeploy
   String expandedDir = files[i];
   int period = expandedDir.lastIndexOf(.);
  @@ -719,10 +720,13 @@
   String contextPath = / + expandedDir;
   if (contextPath.equals(/ROOT))
   contextPath = ;
  -if (dir.lastModified()  expanded.lastModified()) {
  +if (dirLastModified  expanded.lastModified()) {
   try {
  -((Deployer) host).remove(contextPath, true);
   deployed.remove(files[i]);
  +if (host.findChild(contextPath) != null) {
  +((Deployer) host).remove(contextPath, 
  + true);
  +}
   } catch (Throwable t) {
   
log.error(sm.getString(hostConfig.undeployJar.error,
  files[i]), t);
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 00:42:51

  Modified:catalina/src/share/org/apache/catalina/core
StandardHostDeployer.java
  Log:
  - Address bug 20758.
  - Remove apparently useless reference.
  
  Revision  ChangesPath
  1.10  +2 -10 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java
  
  Index: StandardHostDeployer.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHostDeployer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardHostDeployer.java 10 Jun 2003 20:03:42 -  1.9
  +++ StandardHostDeployer.java 15 Jun 2003 07:42:51 -  1.10
  @@ -123,13 +123,6 @@
   
   
   /**
  - * The codeContext/code that was added via a call to
  - * codeaddChild()/code while parsing the configuration descriptor.
  - */
  -private Context context = null;
  -
  -
  -/**
* The codeContextRuleSet/code associated with our
* codedigester/code instance.
*/
  @@ -493,7 +486,6 @@
   }
   
   // Install the new web application
  -this.context = null;
   this.overrideDocBase = docBase;
   InputStream stream = null;
   try {
  @@ -800,7 +792,7 @@
*/
   public void addChild(Container child) {
   
  -context = (Context) child;
  +Context context = (Context) child;
   String contextPath = context.getPath();
   if (contextPath == null)
   throw new IllegalArgumentException
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 01:17:37

  Modified:catalina/src/share/org/apache/catalina/servlets
DefaultServlet.java
  Log:
  - Using a thread local doesn't seem worthwhile, as corectness requires the
resource info be recycled at the end of processing (otherwise, the context
cannot be garbage collected when undeploying).
  
  Revision  ChangesPath
  1.11  +6 -27 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultServlet.java   1 May 2003 11:29:16 -   1.10
  +++ DefaultServlet.java   15 Jun 2003 08:17:37 -  1.11
  @@ -193,12 +193,6 @@
   protected static URLEncoder urlEncoder;
   
   
  -/**
  - * Thread local resource info.
  - */
  -protected ThreadLocal localResourceInfo = new ThreadLocal();
  -
  -
   // - Static Initializer
   
   
  @@ -247,9 +241,6 @@
* Finalize this servlet.
*/
   public void destroy() {
  -
  -;   // No actions necessary
  -
   }
   
   
  @@ -590,13 +581,7 @@
   // Input stream for temp. content file used to support partial PUT
   FileInputStream contentFileInStream = null;
   
  -ResourceInfo resourceInfo = (ResourceInfo) localResourceInfo.get();
  -if (resourceInfo == null) {
  -resourceInfo = new ResourceInfo(path, resources);
  -localResourceInfo.set(resourceInfo);
  -} else {
  -resourceInfo.set(path, resources);
  -}
  +ResourceInfo resourceInfo = new ResourceInfo(path, resources);
   Range range = parseContentRange(req, resp);
   
   InputStream resourceInputStream = null;
  @@ -920,13 +905,7 @@
   
   // Retrieve the Catalina context and Resources implementation
   DirContext resources = getResources();
  -ResourceInfo resourceInfo = (ResourceInfo) localResourceInfo.get();
  -if (resourceInfo == null) {
  -resourceInfo = new ResourceInfo(path, resources);
  -localResourceInfo.set(resourceInfo);
  -} else {
  -resourceInfo.set(path, resources);
  -}
  +ResourceInfo resourceInfo = new ResourceInfo(path, resources);
   
   if (!resourceInfo.exists) {
   response.sendError(HttpServletResponse.SC_NOT_FOUND, 
  
  
  

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



DO NOT REPLY [Bug 20786] New: - Incorrect output of session information

2003-06-15 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=20786.
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=20786

Incorrect output of session information

   Summary: Incorrect output of session information
   Product: Tomcat 4
   Version: 4.1.24
  Platform: All
OS/Version: All
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Webapps:Manager
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The manager webapps output for the list off sessions of a webapp seems to be
incorrect. In ManagerServlet.java in Method sessions there are frequent uses of
StringManager.getString which seem to be broken.

The output is:

OK - Session information for application at context path /
Default maximum session inactive interval 5 minutes
10291 minutes:{1} sessions

instead of

OK - Session information for application at context path /
Default maximum session inactive interval 5 minutes
10 minutes:291 sessions

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



Re: Apache Tomcat 4.1.24 logging question

2003-06-15 Thread Glenn Nielsen
[EMAIL PROTECTED] wrote:
Hello,

  I'm a brand new user of Apache Tomcat 4.1.24 (on windows 2000), and I have a question.

First of all, forgive me if this is trivial, but investigating the source, and various web resources, I was not capable to find the answer, so I hope you can help me.

I saw that Tomcat has a different log for each deployed web application.

And I also saw that there is a log (example: localhost_log.2003-06-14.txt) that is the server log.

I wrote a class that does some stuff, I jarred it and I've put it in the endorsed 
directory.
It is important, for me, that this class is loaded from that directory
(it is not relevant, for the sake of my question, to tell you why; just take it as a 
must).
Well, how can I do to write to the server log from within that class ?
More precisely, which import and APIs must I use ?
If you configure your Tomcat Host with the attribute swallowOutput=true you can 
just
print to System.out.  Tomcat will make sure the output gets into the appropriate Host
or web application log.
Regards,

Glenn

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


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

2003-06-15 Thread remm
remm2003/06/15 06:03:11

  Modified:catalina/src/share/org/apache/catalina Host.java
  Log:
  - Update the host properties, as discussed earlier:
- liveDeploy - autoDeploy: dynamic deployement of webapps put in the host
  appBase
- autoDeploy - deployOnStartup: Deploy webapps from appBase on startup
  - Neither of these have a good reason to be false by default (IMO).
  
  Revision  ChangesPath
  1.4   +21 -5 
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java
  
  Index: Host.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Host.java 16 Sep 2002 04:45:38 -  1.3
  +++ Host.java 15 Jun 2003 13:03:11 -  1.4
  @@ -133,7 +133,7 @@
   /**
* Return the value of the auto deploy flag.  If true, it indicates that 
* this host's child webapps should be discovred and automatically 
  - * deployed.
  + * deployed dynamically.
*/
   public boolean getAutoDeploy();
   
  @@ -161,6 +161,22 @@
   public DefaultContext getDefaultContext();
   
   
  +/**
  + * Return the value of the deploy on startup flag.  If true, it indicates 
  + * that this host's child webapps should be discovred and automatically 
  + * deployed.
  + */
  +public boolean getDeployOnStartup();
  +
  +
  +/**
  + * Set the deploy on startup flag value for this host.
  + * 
  + * @param deployOnStartup The new deploy on startup flag
  + */
  +public void setDeployOnStartup(boolean deployOnStartup);
  +
  +
   /**
* Return the canonical, fully qualified, name of the virtual host
* this Container represents.
  
  
  

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core mbeans-descriptors.xml StandardHost.java

2003-06-15 Thread remm
remm2003/06/15 06:03:36

  Modified:catalina/src/share/org/apache/catalina/core
mbeans-descriptors.xml StandardHost.java
  Log:
  - Update the host properties, as discussed earlier:
- liveDeploy - autoDeploy: dynamic deployement of webapps put in the host
  appBase
- autoDeploy - deployOnStartup: Deploy webapps from appBase on startup
  - Neither of these have a good reason to be false by default (IMO).
  
  Revision  ChangesPath
  1.17  +4 -0  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/mbeans-descriptors.xml,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- mbeans-descriptors.xml15 May 2003 08:31:58 -  1.16
  +++ mbeans-descriptors.xml15 Jun 2003 13:03:35 -  1.17
  @@ -445,6 +445,10 @@
  description=The debugging detail level for this component
  type=int/
 
  +attribute name=deploy
  +   description=The deploy on startup flag for this Host
  +   type=boolean/
  + 
   attribute name=deployXML
  description=deploy Context XML config files property
  is=true
  
  
  
  1.17  +38 -12
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java
  
  Index: StandardHost.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- StandardHost.java 23 May 2003 10:54:35 -  1.16
  +++ StandardHost.java 15 Jun 2003 13:03:35 -  1.17
  @@ -158,6 +158,12 @@
   
   
   /**
  + * The deploy on startup flag for this Host.
  + */
  +private boolean deployOnStartup = true;
  +
  +
  +/**
* deploy Context XML config files property.
*/
   private boolean deployXML = true;
  @@ -247,8 +253,7 @@
   
   /**
* Return the value of the auto deploy flag.  If true, it indicates that 
  - * this host's child webapps should be discovred and automatically 
  - * deployed at startup time.
  + * this host's child webapps will be dynamically deployed.
*/
   public boolean getAutoDeploy() {
   
  @@ -322,6 +327,7 @@
   return (this.defaultContext);
   }
   
  +
   /**
* Return the Java class name of the Context implementation class
* for new web applications.
  @@ -350,6 +356,33 @@
   
   
   /**
  + * Return the value of the deploy on startup flag.  If true, it indicates 
  + * that this host's child webapps should be discovred and automatically 
  + * deployed at startup time.
  + */
  +public boolean getDeployOnStartup() {
  +
  +return (this.deployOnStartup);
  +
  +}
  +
  +
  +/**
  + * Set the deploy on startup flag value for this host.
  + * 
  + * @param autoDeploy The new deploy on startup flag
  + */
  +public void setDeployOnStartup(boolean deployOnStartup) {
  +
  +boolean oldDeployOnStartup = this.deployOnStartup;
  +this.deployOnStartup = deployOnStartup;
  +support.firePropertyChange(deployOnStartup, oldDeployOnStartup, 
  +   this.deployOnStartup);
  +
  +}
  +
  +
  +/**
* Deploy XML Context config files flag accessor.
*/
   public boolean isDeployXML() {
  @@ -377,9 +410,7 @@
* encountered.
*/
   public boolean getLiveDeploy() {
  -
  -return (this.liveDeploy);
  -
  +return (this.autoDeploy);
   }
   
   
  @@ -389,12 +420,7 @@
* @param liveDeploy The new live deploy flag
*/
   public void setLiveDeploy(boolean liveDeploy) {
  -
  -boolean oldLiveDeploy = this.liveDeploy;
  -this.liveDeploy = liveDeploy;
  -support.firePropertyChange(liveDeploy, oldLiveDeploy, 
  -   this.liveDeploy);
  -
  +setAutoDeploy(liveDeploy);
   }
   
   
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 06:10:41

  Modified:catalina/src/share/org/apache/catalina/core
StandardContext.java
  Log:
  - Move context descriptors to
$CATALINA_BASE/conf/engine name/host name, as proposed by Glenn.
  - This should make the feature secure, and I think there's no justification
anymore for the deployXML flag.
  - Note: The manager webapp may need a few updates, which are in progress.
  
  Revision  ChangesPath
  1.65  +33 -6 
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.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- StandardContext.java  15 Jun 2003 07:09:10 -  1.64
  +++ StandardContext.java  15 Jun 2003 13:10:40 -  1.65
  @@ -3866,19 +3866,19 @@
   boolean ok = true;
   
   // Set config file name
  -String appBase = getAppBase();
  -if ((getConfigFile() == null)  (appBase != null)) {
  +File configBase = getConfigBase();
  +if ((getConfigFile() == null)  (configBase != null)) {
   
   String name = getName();
   if (name.equals()) {
   name = ROOT;
   }
  -File file = new File(appBase);
  -file = new File(file, name + .xml);
  +File file = new File(configBase, name + .xml);
   
   setConfigFile(file.getPath());
  -if( log.isDebugEnabled() )
  +if (log.isDebugEnabled())
   log.debug( Set config file  + file);
  +
   }
   
   // Add missing components as necessary
  @@ -4542,6 +4542,33 @@
   appBase = ((Host) container).getAppBase();
   }
   return appBase;
  +}
  +
  +
  +/**
  + * Get config base.
  + */
  +private File getConfigBase() {
  +File configBase = 
  +new File(System.getProperty(catalina.base), conf);
  +Container container = this;
  +Container host = null;
  +Container engine = null;
  +while (container != null) {
  +if (container instanceof Host)
  +host = container;
  +if (container instanceof Engine)
  +engine = container;
  +container = container.getParent();
  +}
  +if (engine != null) {
  +configBase = new File(configBase, engine.getName());
  +}
  +if (host != null) {
  +configBase = new File(configBase, host.getName());
  +}
  +configBase.mkdirs();
  +return configBase;
   }
   
   
  
  
  

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



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

2003-06-15 Thread remm
remm2003/06/15 06:11:25

  Modified:catalina/src/share/org/apache/catalina/startup
HostConfig.java
  Log:
  - Update the host properties, as discussed earlier:
- liveDeploy - autoDeploy: dynamic deployement of webapps put in the host
  appBase
- autoDeploy - deployOnStartup: Deploy webapps from appBase on startup
  - Neither of these have a good reason to be false by default (IMO).
  - Move context descriptors to
$CATALINA_BASE/conf/engine name/host name, as proposed by Glenn.
  - This should make the feature secure, and I think there's no justification
anymore for the deployXML flag.
  - Note: The manager webapp may need a few updates, which are in progress.
  
  Revision  ChangesPath
  1.14  +32 -39
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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HostConfig.java   15 Jun 2003 07:41:56 -  1.13
  +++ HostConfig.java   15 Jun 2003 13:11:25 -  1.14
  @@ -84,8 +84,10 @@
   import javax.naming.NamingException;
   import javax.naming.directory.DirContext;
   import org.apache.naming.resources.ResourceAttributes;
  +import org.apache.catalina.Container;
   import org.apache.catalina.Context;
   import org.apache.catalina.Deployer;
  +import org.apache.catalina.Engine;
   import org.apache.catalina.Host;
   import org.apache.catalina.Lifecycle;
   import org.apache.catalina.LifecycleEvent;
  @@ -160,13 +162,6 @@
   
   
   /**
  - * Should we monitor the codeappBase/code directory for new
  - * applications and automatically deploy them?
  - */
  -private boolean liveDeploy = false;
  -
  -
  -/**
* Should we unpack WAR files when auto-deploying applications in the
* codeappBase/code directory?
*/
  @@ -297,28 +292,6 @@
   
   
   /**
  - * Return the live deploy flag for this component.
  - */
  -public boolean isLiveDeploy() {
  -
  -return (this.liveDeploy);
  -
  -}
  -
  -
  -/**
  - * Set the live deploy flag for this component.
  - *
  - * @param liveDeploy The new live deploy flag
  - */
  -public void setLiveDeploy(boolean liveDeploy) {
  -
  -this.liveDeploy = liveDeploy;
  -
  -}
  -
  -
  -/**
* Return the unpack WARs flag.
*/
   public boolean isUnpackWARs() {
  @@ -400,7 +373,6 @@
   this.debug = hostDebug;
   }
   setDeployXML(((StandardHost) host).isDeployXML());
  -setLiveDeploy(((StandardHost) host).getLiveDeploy());
   setUnpackWARs(((StandardHost) host).isUnpackWARs());
   setXmlNamespaceAware(((StandardHost) host).getXmlNamespaceAware());
   setXmlValidation(((StandardHost) host).getXmlValidation());
  @@ -438,6 +410,23 @@
   
   
   /**
  + * Return a File object representing the configuration root directory
  + * for our associated Host.
  + */
  +protected File configBase() {
  +
  +File file = new File(System.getProperty(catalina.base), conf);
  +Container parent = host.getParent();
  +if ((parent != null)  (parent instanceof Engine)) {
  +file = new File(file, parent.getName());
  +}
  +file = new File(file, host.getName());
  +return (file);
  +
  +}
  +
  +
  +/**
* Deploy applications for any directories or WAR files that are found
* in our application root directory.
*/
  @@ -449,9 +438,13 @@
   File appBase = appBase();
   if (!appBase.exists() || !appBase.isDirectory())
   return;
  -String files[] = appBase.list();
  +File configBase = configBase();
  +if (configBase.exists()  configBase.isDirectory()) {
  +String configFiles[] = configBase.list();
  +deployDescriptors(configBase, configFiles);
  +}
   
  -deployDescriptors(appBase, files);
  +String files[] = appBase.list();
   deployWARs(appBase, files);
   deployDirectories(appBase, files);
   
  @@ -461,7 +454,7 @@
   /**
* Deploy XML context descriptors.
*/
  -protected void deployDescriptors(File appBase, String[] files) {
  +protected void deployDescriptors(File configBase, String[] files) {
   
   if (!deployXML)
  return;
  @@ -474,7 +467,7 @@
   continue;
   if (deployed.contains(files[i]))
   continue;
  -File dir = new File(appBase, files[i]);
  +File dir = new File(configBase, files[i]);
   if 

cvs commit: jakarta-tomcat-catalina/catalina/src/conf web.xml

2003-06-15 Thread remm
remm2003/06/15 06:12:44

  Modified:catalina/src/conf web.xml
  Log:
  - Comment out the invoker servlet declaration in addition to its mapping.
  
  Revision  ChangesPath
  1.18  +2 -0  jakarta-tomcat-catalina/catalina/src/conf/web.xml
  
  Index: web.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- web.xml   8 Jun 2003 18:18:56 -   1.17
  +++ web.xml   15 Jun 2003 13:12:44 -  1.18
  @@ -70,6 +70,7 @@
 !--   debug   Debugging detail level for messages logged --
 !--   by this servlet.  [0]  --
   
  +!--
   servlet
   servlet-nameinvoker/servlet-name
   servlet-class
  @@ -81,6 +82,7 @@
   /init-param
   load-on-startup2/load-on-startup
   /servlet
  +--
   
   
 !-- The JSP page compiler and execution servlet, which is the mechanism  --
  
  
  

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



cvs commit: jakarta-tomcat-5 build.xml

2003-06-15 Thread remm
remm2003/06/15 06:13:18

  Modified:.build.xml
  Log:
  - Copy manager and admin.xml to the new locations.
  
  Revision  ChangesPath
  1.131 +2 -2  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- build.xml 5 Jun 2003 18:28:07 -   1.130
  +++ build.xml 15 Jun 2003 13:13:17 -  1.131
  @@ -618,9 +618,9 @@
   
   !-- Add XML declarations for admin and manager --
   copy file=${tomcat.build}/server/webapps/manager/manager.xml
  - todir=${tomcat.build}/webapps /
  + todir=${tomcat.build}/conf/Catalina/localhost /
   copy file=${tomcat.build}/server/webapps/admin/admin.xml
  - todir=${tomcat.build}/webapps /
  + todir=${tomcat.build}/conf/Catalina/localhost /
   
 /target
   
  
  
  

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



cvs commit: jakarta-tomcat-5 build.xml

2003-06-15 Thread remm
remm2003/06/15 06:32:35

  Modified:.build.xml
  Log:
  - Copy the commons-daemon JAR (the daemon loader class is still needed).
  
  Revision  ChangesPath
  1.132 +2 -0  jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- build.xml 15 Jun 2003 13:13:17 -  1.131
  +++ build.xml 15 Jun 2003 13:32:35 -  1.132
  @@ -152,6 +152,7 @@
   copy todir=${tomcat.build}/server/lib file=${commons-modeler.jar} /
   
   copy todir=${tomcat.build}/bin file=${commons-daemon.jsvc.tar.gz} /
  +copy todir=${tomcat.build}/bin file=${commons-daemon.jar} /
   
   copy todir=${tomcat.build}/common/lib file=${ant.jar}/
 /target
  @@ -853,6 +854,7 @@
   !-- Copy Unix JSVC from commons-daemon --
   copy file=${commons-daemon.jsvc.tar.gz} 
   tofile=${tomcat.dist}/bin/jsvc.tar.gz /
  +copy todir=${tomcat.build}/bin file=${commons-daemon.jar} /
   
   echoTarget: Webapps precompilation .../echo
   
  
  
  

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



Bug report for Tomcat 3 [2003/06/15]

2003-06-15 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  258|Unc|Nor|2000-11-27|response.SendRedirect() resets/destroys Cookies th|
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 2478|Opn|Cri|2001-07-06|Passing Session variables between JSP's and Servle|
| 4551|Opn|Nor|2001-10-31|Ctx( /tt01 ): IOException in: R( /tt01 + /com/abc/|
| 4893|Unc|Blk|2001-11-15|Tomcat dies with following error..|
| 4980|New|Min|2001-11-20|Startup message indicates incorrect log file  |
| 4994|New|Nor|2001-11-21|Tomcat needs a mechanism for clean and certain shu|
| 5064|New|Cri|2001-11-25|Socket write error when include files is more than|
| 5108|New|Maj|2001-11-26|Docs for Tomcat 3.2.x appear to be for Tomcat 3.3 |
| 5137|New|Nor|2001-11-27|Null pointer in class loader after attempting to r|
| 5160|Unc|Maj|2001-11-28|'IllegalStateException'   |
| 5331|New|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 5510|New|Blk|2001-12-19|How to call ejb deployed in JBoss from Tomcat serv|
| 5756|New|Nor|2002-01-08|jspc.bat exits with wrong ERRORLEVEL  |
| 5797|New|Nor|2002-01-10|UnCatched ? StringIndexOutOfBoundsException: Strin|
| 6027|New|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6168|New|Blk|2002-02-01|IllegalStateException |
| 6451|New|Cri|2002-02-14|Stackoverflow |
| 6478|New|Enh|2002-02-14|Default Tomcat Encoding   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 6648|New|Nor|2002-02-25|jakarta-servletapi build with java 1.4 javadoc err|
| 6702|New|Cri|2002-02-27|win 2k services not working   |
| 6796|New|Cri|2002-03-01|Tomcat dies periodically  |
| 6989|New|Maj|2002-03-08|Unable to read tld file during parallel JSP compil|
| 7008|Opn|Maj|2002-03-10|facade.HttpServletRequestFacade.getParameter(HttpS|
| 7013|New|Cri|2002-03-10|Entering a servlet path with non-ISO8859-1 charact|
| 7227|New|Nor|2002-03-19|error-code directive don't work |
| 7236|New|Blk|2002-03-19|Permission denied to do thread.stop   |
| 7626|New|Nor|2002-03-29|classloader not working properly  |
| 7652|New|Cri|2002-04-01|Tomcat stalls periodically|
| 7762|New|Enh|2002-04-05|stdout logfile handling   |
| 7785|New|Blk|2002-04-06|tomcat bug in context reloading   |
| 7789|New|Maj|2002-04-06|JSP Cookie Read/Write Fails With DNS Names|
| 7863|New|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8154|New|Nor|2002-04-16|logrotate script in RPM rotates non-existing file |
| 8155|New|Nor|2002-04-16|Tomcat from RPM doesn't do logrotate  |
| 8187|New|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 8239|New|Cri|2002-04-18|Resource temporary unavailable|
| 8263|New|Cri|2002-04-18|url-pattern easy to circumvent|
| 8634|New|Nor|2002-04-30|no way to specify different modules.xml file  |
| 8992|New|Blk|2002-05-10|IE6/XP: Limitation of POST Area within HTTP reques|
| 9086|New|Enh|2002-05-14|NPE org.apache.tomcat.core.ServerSession.setAttrib|
| 9250|New|Maj|2002-05-20|outOfMemoryError  |
| 9362|New|Nor|2002-05-23|compiilation of JSP that includes a non-existant f|
| 9367|New|Maj|2002-05-23|HttpSessionBindingEvent not thrown for HttpSession|
| 9390|New|Nor|2002-05-24|jasper compilation error in tomcat|
| 9480|New|Nor|2002-05-29|Data connection pooling   |
| 9607|New|Maj|2002-06-04|precompile JSP|
| 9737|New|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|1|New|Cri|2002-06-19|IOException Broken Pipe when authenticating JDBCRe|
|10039|New|Nor|2002-06-20|TimeStamp will not work correctly.|

Bug report for Tomcat 4 [2003/06/15]

2003-06-15 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2885|Opn|Maj|2001-07-30|JspCompiler does not recompile changed JSP's  |
| 3098|Opn|Maj|2001-08-11|RequestDispatcher on relative (to request path)   |
| 3888|Opn|Blk|2001-09-30|WebappClassLoader: Lifecycle error : CL stopped   |
| 4138|Opn|Nor|2001-10-12|Processor threads have inconsistent ClassLoader st|
| 4350|Ass|Nor|2001-10-22|SSLAuthenticator did not associate SSO session|
| 4352|Ass|Nor|2001-10-22|JDBCRealm does not work with CLIENT-CERT auth-meth|
| 5143|New|Enh|2001-11-27|Please allow to specify the cipher set for HTTPS c|
| 5329|New|Nor|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5598|Opn|Maj|2001-12-27|(JSP Problem) RequestDispatcher doesn't include HT|
| 5704|Ass|Maj|2002-01-05|CgiServlet corrupting images? |
| 5715|Opn|Nor|2002-01-07|response.setContentType() in Filter.doFilter not c|
| 5759|Opn|Maj|2002-01-09|CGI servlet mapping by extension *.cgi does not wo|
| 5762|Opn|Maj|2002-01-09|CGI servlet misses to include port number in HTTP_|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5858|New|Enh|2002-01-15|Add tomcat dir to java.library.path   |
| 5952|Opn|Nor|2002-01-22|Refence to $JAVACMD  in tomcat.conf incorrect in R|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 6218|Opn|Nor|2002-02-04|Relative links broken for servlets|
| 6229|New|Enh|2002-02-04|Need way to specify where to write catalina.out   |
| 6279|New|Nor|2002-02-06|Resubmit to j_security_check mistakenly fetches a |
| 6399|New|Nor|2002-02-12|unknown protocol: https   |
| 6408|New|Enh|2002-02-12|Starting tomcat from a cygwin bash shell using 'st|
| 6582|New|Min|2002-02-20|Sample code does not match behavior   |
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6649|New|Nor|2002-02-25|jakarta-servletapi-4 build using java 1.4 javadoc |
| 6659|New|Nor|2002-02-25|HttpUtils.getRequestURL gives incorrect URL with w|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7080|New|Maj|2002-03-13|Interbase JDBCRealm - Bug # 5564 - Have a safe fix|
| 7116|New|Min|2002-03-14|JDBC realm doesn't handle NULLpasswords   |
| 7190|New|Nor|2002-03-18|GenericServlet spurious log's in init(), destroy()|
| 7207|New|Nor|2002-03-18|Redeployment Problem under Tomcat 4.0.2   |
| 7360|New|Nor|2002-03-22|res-sharing-scope not supported   |
| 7366|New|Enh|2002-03-22|ISAPI Redirector Replacement  |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7506|New|Nor|2002-03-27|Reading InputStream returned in the following sena|
| 7571|New|Nor|2002-03-28|DataInputStream readLong() Problem|
| 7588|New|Nor|2002-03-28|Session cannot be established if there are multipl|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in h|
| 7689|New|Min|2002-04-02|Performance problem with Xerces parser|
| 7702|New|Enh|2002-04-03|[PATCH] Speed up Tomcat a tiny bit|
| 7723|New|Enh|2002-04-03|[patch] additional factory for org.apache.naming.f|
| 7831|New|Nor|2002-04-08|[PATCH] JNDIRealm does not work with CLIENT-CERT a|
| 7880|Ver|Cri|2002-04-09|If a TLV flags flags an error during the translati|
| 7968|New|Min|2002-04-11|JSSE Documentation|
| 8026|New|Enh|2002-04-12|Exceptions in StandardHostDeployer.addChild are lo|
| 8079|New|Enh|2002-04-15|Tomcat cannot start if appBase directory is access|
| 8091|Opn|Min|2002-04-15|JDBCRealm makes Tomcat unusable if the database is|
| 8100|New|Maj|2002-04-15|Session Tracking and HttpURLConnection|
| 

Bug report for Watchdog [2003/06/15]

2003-06-15 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld urn should be uri BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
+-+---+---+--+--+
| Total   13 bugs   |
+---+

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant DeployTask.java InstallTask.java RemoveTask.java

2003-06-15 Thread remm
remm2003/06/15 11:27:12

  Modified:catalina/src/share/org/apache/catalina/ant DeployTask.java
InstallTask.java RemoveTask.java
  Log:
  - Update the Ant tasks as described in the updated documentation.
  - Install and remove will still be present for compatibility, but are deprecated.
  
  Revision  ChangesPath
  1.2   +97 -14
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/DeployTask.java
  
  Index: DeployTask.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/DeployTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DeployTask.java   18 Jul 2002 16:48:13 -  1.1
  +++ DeployTask.java   15 Jun 2003 18:27:11 -  1.2
  @@ -87,6 +87,35 @@
   
   
   /**
  + * URL of the context configuration file for this application, if any.
  + */
  +protected String config = null;
  +
  +public String getConfig() {
  +return (this.config);
  +}
  +
  +public void setConfig(String config) {
  +this.config = config;
  +}
  +
  +
  +/**
  + * URL of the server local web application archive (WAR) file 
  + * to be deployed.
  + */
  +protected String localWar = null;
  +
  +public String getLocalWar() {
  +return (this.localWar);
  +}
  +
  +public void setLocalWar(String localWar) {
  +this.localWar = localWar;
  +}
  +
  +
  +/**
* The context path of the web application we are managing.
*/
   protected String path = null;
  @@ -101,6 +130,34 @@
   
   
   /**
  + * Tag to associate with this to be deployed webapp.
  + */
  +protected String tag = null;
  +
  +public String getTag() {
  +return (this.tag);
  +}
  +
  +public void setTag(String tag) {
  +this.tag = tag;
  +}
  +
  +
  +/**
  + * Update existing webapps.
  + */
  +protected boolean update = false;
  +
  +public boolean getUpdate() {
  +return (this.update);
  +}
  +
  +public void setUpdate(boolean update) {
  +this.update = update;
  +}
  +
  +
  +/**
* URL of the web application archive (WAR) file to be deployed.
*/
   protected String war = null;
  @@ -129,22 +186,48 @@
   throw new BuildException
   (Must specify 'path' attribute);
   }
  -if (war == null) {
  +if ((war == null)  (localWar == null)  (tag == null)) {
   throw new BuildException
  -(Must specify 'war' attribute);
  +(Must specify either 'war', 'localWar', or 'tag' attribute);
   }
  +
  +// Building an input stream on the WAR to upload, if any
   BufferedInputStream stream = null;
  +String contentType = null;
   int contentLength = -1;
  -try {
  -URL url = new URL(war);
  -URLConnection conn = url.openConnection();
  -contentLength = conn.getContentLength();
  -stream = new BufferedInputStream(conn.getInputStream(), 1024);
  -} catch (IOException e) {
  -throw new BuildException(e);
  +if (war != null) {
  +try {
  +URL url = new URL(war);
  +URLConnection conn = url.openConnection();
  +contentLength = conn.getContentLength();
  +stream = new BufferedInputStream(conn.getInputStream(), 1024);
  +} catch (IOException e) {
  +throw new BuildException(e);
  +}
  +contentType = application/octet-stream;
  +}
  +
  +// Building URL
  +StringBuffer sb = new StringBuffer(/deploy?path=);
  +sb.append(URLEncoder.encode(this.path));
  +if ((war == null)  (config != null)) {
  +sb.append(config=);
  +sb.append(URLEncoder.encode(config));
   }
  +if ((war == null)  (localWar != null)) {
  +sb.append(war=);
  +sb.append(URLEncoder.encode(localWar));
  +}
  +if (update) {
  +sb.append(update=true);
  +}
  +if ((war != null)  (tag != null)) {
  +sb.append(tag=);
  +sb.append(URLEncoder.encode(tag));
  +}
  +
   execute(/deploy?path= + URLEncoder.encode(this.path), stream,
  -application/octet-stream, contentLength);
  +contentType, contentLength);
   
   }
   
  
  
  
  1.2   +5 -4  
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/ant/InstallTask.java
  
  Index: InstallTask.java
  ===
  RCS file: 

cvs commit: jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager HTMLManagerServlet.java LocalStrings.properties ManagerServlet.java

2003-06-15 Thread remm
remm2003/06/15 11:31:45

  Modified:webapps/manager/WEB-INF/classes/org/apache/catalina/manager
HTMLManagerServlet.java LocalStrings.properties
ManagerServlet.java
  Log:
  - Update the manager to implement the new functionality as described in the docs.
  - Pausing won't be implemented, due to difficulties, and the likelihood of bringing
the whole server to its knees (thanks to Glenn for poiting that out).
  - Versioning is not tested yet.
  - Known issue: locking occurs on an uploaded WAR, for reasons which
elude me right now.
  - Known issue 2: to deploy local WARs, a jar:file: URL must be used.
  
  Revision  ChangesPath
  1.3   +53 -50
jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java
  
  Index: HTMLManagerServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/webapps/manager/WEB-INF/classes/org/apache/catalina/manager/HTMLManagerServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HTMLManagerServlet.java   4 Jun 2003 07:58:58 -   1.2
  +++ HTMLManagerServlet.java   15 Jun 2003 18:31:45 -  1.3
  @@ -88,7 +88,7 @@
   import org.apache.commons.fileupload.FileUploadException;
   
   /**
  -* Servlet that enables remote management of the web applications installed
  +* Servlet that enables remote management of the web applications deployed
   * within the same virtual host as this web application is.  Normally, this
   * functionality will be protected by a security constraint in the web
   * application deployment descriptor.  However, this requirement can be
  @@ -131,9 +131,9 @@
   String command = request.getPathInfo();
   
   String path = request.getParameter(path);
  -String installPath = request.getParameter(installPath);
  -String installConfig = request.getParameter(installConfig);
  -String installWar = request.getParameter(installWar);
  +String deployPath = request.getParameter(deployPath);
  +String deployConfig = request.getParameter(deployConfig);
  +String deployWar = request.getParameter(deployWar);
   
   // Prepare our output writer to generate the response message
   Locale locale = Locale.getDefault();
  @@ -144,13 +144,13 @@
   String message = ;
   // Process the requested command
   if (command == null || command.equals(/)) {
  -} else if (command.equals(/install)) {
  -message = install(installConfig, installPath, installWar);
  +} else if (command.equals(/deploy)) {
  +message = deployInternal(deployConfig, deployPath, deployWar);
   } else if (command.equals(/list)) {
   } else if (command.equals(/reload)) {
   message = reload(path);
  -} else if (command.equals(/remove)) {
  -message = remove(path);
  +} else if (command.equals(/undeploy)) {
  +message = undeploy(path);
   } else if (command.equals(/sessions)) {
   message = sessions(path);
   } else if (command.equals(/start)) {
  @@ -216,7 +216,7 @@
   FileItem item = (FileItem) iter.next();
   
   if (!item.isFormField()) {
  -if (item.getFieldName().equals(installWar) 
  +if (item.getFieldName().equals(deployWar) 
   warUpload == null) {
   warUpload = item;
   } else {
  @@ -227,13 +227,13 @@
   while(true) {
   if (warUpload == null) {
   message = sm.getString
  -(htmlManagerServlet.installUploadNoFile);
  +(htmlManagerServlet.deployUploadNoFile);
   break;
   }
   war = warUpload.getName();
   if (!war.toLowerCase().endsWith(.war)) {
   message = sm.getString
  -(htmlManagerServlet.installUploadNotWar,war);
  +(htmlManagerServlet.deployUploadNotWar,war);
   break;
   }
   // Get the filename if uploaded name includes a path
  @@ -256,10 +256,12 @@
   File file = new File(appBaseDir,war);
   if (file.exists()) {
   message = sm.getString
  -(htmlManagerServlet.installUploadWarExists,war);
  +(htmlManagerServlet.deployUploadWarExists,war);
   break;
   }
   warUpload.write(file);
  +war = file.getAbsolutePath();
  +/*
   try {
   URL url = file.toURL();
   

cvs commit: jakarta-tomcat-catalina/webapps/docs status.xml

2003-06-15 Thread remm
remm2003/06/15 11:32:10

  Modified:webapps/docs status.xml
  Log:
  - Update status.
  
  Revision  ChangesPath
  1.2   +0 -3  jakarta-tomcat-catalina/webapps/docs/status.xml
  
  Index: status.xml
  ===
  RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/status.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- status.xml3 Jun 2003 20:32:55 -   1.1
  +++ status.xml15 Jun 2003 18:32:10 -  1.2
  @@ -44,9 +44,6 @@
   
   status
 item priority=High owner=remm
  -Deployer refactoring.
  -  /item
  -  item priority=High owner=remm
   Documentation updates for new user guide book.
 /item
 item priority=Medium owner=remm
  
  
  

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



cvs commit: jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/puretls PureTLSSocketFactory.java PureTLSSupport.java

2003-06-15 Thread billbarker
billbarker2003/06/15 19:45:56

  Modified:util/java/org/apache/tomcat/util/net/puretls
PureTLSSocketFactory.java PureTLSSupport.java
  Log:
  Fixes for CLIENT-CERT auth when using PureTLS
  
  1) We need to set the rootFile always, since it is needed for CLIENT-CERT even when 
clientAuth=false.
  2) Fix off-by-one problem with generating the x509 certs.
  
  Revision  ChangesPath
  1.3   +9 -5  
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/puretls/PureTLSSocketFactory.java
  
  Index: PureTLSSocketFactory.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/puretls/PureTLSSocketFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PureTLSSocketFactory.java 12 Jun 2003 04:30:41 -  1.2
  +++ PureTLSSocketFactory.java 16 Jun 2003 02:45:56 -  1.3
  @@ -160,11 +160,15 @@
}
}
   
  - SSLContext tmpContext=new SSLContext();
  - if(clientAuth){
  - tmpContext.loadRootCertificates(rootFile);
  - }
  - tmpContext.loadEAYKeyFile(keyStoreFile,keyPass);
  +SSLContext tmpContext=new SSLContext();
  +try {
  +tmpContext.loadRootCertificates(rootFile);
  +} catch(IOException iex) {
  +if(logger.isDebugEnabled())
  +logger.debug(Error loading Client Root Store:  + 
  + rootFile,iex);
  +}
  +tmpContext.loadEAYKeyFile(keyStoreFile,keyPass);
tmpContext.useRandomnessFile(randomFile,keyPass);

SSLPolicyInt policy=new SSLPolicyInt();
  
  
  
  1.2   +16 -4 
jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/puretls/PureTLSSupport.java
  
  Index: PureTLSSupport.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/net/puretls/PureTLSSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PureTLSSupport.java   4 Oct 2002 20:03:10 -   1.1
  +++ PureTLSSupport.java   16 Jun 2003 02:45:56 -  1.2
  @@ -64,6 +64,7 @@
   import java.net.*;
   import java.util.Vector;
   import java.security.cert.CertificateFactory;
  +import java.security.cert.X509Certificate;
   import org.apache.tomcat.util.buf.HexUtils;
   
   import COM.claymoresystems.sslg.*;
  @@ -83,6 +84,9 @@
   */
   
   class PureTLSSupport implements SSLSupport {
  +static org.apache.commons.logging.Log logger =
  + org.apache.commons.logging.LogFactory.getLog(PureTLSSupport.class);
  +
   private COM.claymoresystems.ptls.SSLSocket ssl;
   
   PureTLSSupport(SSLSocket sock){
  @@ -130,12 +134,16 @@
 CertificateFactory.getInstance(X.509);
   ByteArrayInputStream stream =
 new ByteArrayInputStream(buffer);
  -
  -chain[i]=(java.security.cert.X509Certificate)
  -  cf.generateCertificate(stream);
  +
  +X509Certificate xCert = (X509Certificate)cf.generateCertificate(stream);
  +chain[i-1]= xCert;
  +if(logger.isTraceEnabled()) {
  + logger.trace(Cert #  + i +  =  + xCert);
  + }
 }
   } catch (java.security.cert.CertificateException e) {
  -throw new IOException(JDK's broken cert handling can't parse this 
certificate (which PureTLS likes);
  + logger.info(JDK's broken cert handling can't parse this certificate 
(which PureTLS likes),e);
  +throw new IOException(JDK's broken cert handling can't parse this 
certificate (which PureTLS likes));
   }
   return chain;
   }
  @@ -168,6 +176,10 @@
   }
   
   }
  +
  +
  +
  +
   
   
   
  
  
  

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



DO NOT REPLY [Bug 20794] New: - jsp:directive.page .... / doesnt work

2003-06-15 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=20794.
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=20794

jsp:directive.page  / doesnt work

   Summary: jsp:directive.page  / doesnt work
   Product: Tomcat 4
   Version: 4.1.24
  Platform: Other
OS/Version: Windows NT/2K
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Unknown
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


jsp:directive.page import=java.util.Date /
HTML
HEADTITLEHello World JSP Examlple w/current Time/TITLE/HEAD
BODY
Hello World. The local sever time is %= new Date() %

/BODY
/HTML

The above code give the error as below.
There was similar error when i tried to use jsp:expression.../jsp:expression

type Exception report

message 

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception 

org.apache.jasper.JasperException: /HelloWorld1.jsp(0,5) jsp.error.badaction
at org.apache.jasper.compiler.DefaultErrorHandler.jspError
(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch
(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError
(ErrorDispatcher.java:126)
at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse
(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse
(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2415)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:594)
at 

DO NOT REPLY [Bug 20794] - jsp:directive.page .... / doesnt work

2003-06-15 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=20794.
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=20794

jsp:directive.page  / doesnt work

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-06-16 05:09 ---
The jsp:directive.page / tag only works for XML pages.  It is not for use in 
normal JSP pages (like the one quoted here).

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