Re: Looking for RFC1867 base upload JAVA lib

2001-11-29 Thread Daniel Rall

Katsuyuki Michishita [EMAIL PROTECTED] writes:

 Hi, I am looking for RFC1867 based upload lib.
 I developed upload functionality using famous Jason Hunter's examples of
 o'reilly book.
 However, The company would like to use the libs that apache.org hold.
 Is there anyone who know those library?

Turbine's Fulcrum component has one:

http://cvs.apache.org/viewcvs/jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/upload/

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: tomcat cannot find it's own jar files..HELP!

2001-11-27 Thread Daniel Rall

Starsinic, Frank [EMAIL PROTECTED] writes:

 i've always loved the ease of use of tomcat until i tried tomcat 4.

 i deployed a simple web application and none of the 
 servlet, jasper or catalina jar files seem to get loaded. 

 i was surprised to see a ton of...

 import javax.servlet.xxx ... not found

 type errors when i tested a jsp page.

 do you have any idea why this would happen?

The JAR file containing the Servlet 2.3 API is missing from Catalina's
lib directory.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Tomcat 4.0.1/Apache 1.3/Warp Connection

2001-11-26 Thread Daniel Rall

BoD [EMAIL PROTECTED] writes:

 You want to set CATALINA_BASE, not CATALINA_HOME -- CATALINA_HOME
 points to the location of your Tomcat 4 installation, while
 CATALINA_BASE points to the location your web apps are found in.

 I tried that, too but it changes nothing.  Anyway, like I said in my
 previous mail, there is no such place where my web apps are found
 in, because they are in several different places.

I've never done this, other than putting all web apps in the same
place (by convention under $CATALINA_BASE/webapps/).

 It should be possible (maybe I'm wrong, and if so please correct me)
 to put web apps in different places as long as you tell so in the
 docBase attribute of the context in server.xml.

This does makes sense.  However, you'd have to set your $CATALINA_BASE
to a directory very close to the root of your file system, and
probably unset your Host's appBase attribute (these things are
concatenated together in a fashion similar to
$CATALINA_BASE/[Host.addBase]/[Context.docBase]).

However, looking at StandardContext::getBasePath() from CVS HEAD, it
appears that you should also be able to use an absolute path for the
Context.docBase attribute.


 Daniel Rall

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Emulating JServ's session.topleveldomain with Catalina

2001-11-24 Thread Daniel Rall

Craig R. McClanahan [EMAIL PROTECTED] writes:

 On Wed, 21 Nov 2001, Daniel Rall wrote:

 Using Tomcat 4.0.1, is there any way to emulate JServ's
 session.topleveldomain context configuration?

 # Set the domain= header that gets sent with the cookie. This is
 # entirely optional
 # Default: null
 # this is needed when we vhost to avoid multiple login
 session.topleveldomain=.foo.com

 I would like all requests to the set of virtual hosts represented by
 the glob *.foo.com to share the same session ID.

 Unfortunately, implementing this functionality would violate the Servlet
 spec's requirements about sessions being scoped to a single
 ServletContext.  Even if you were willing to do this, you're going to run
 into lots of technical problems due to the fact that each webapp is loaded
 by it's own classloader -- trying to access a session attribute loaded
 from a different webapp will throw ClassNotFoundException errors at you.

I wasn't clear enough in my original query -- I don't want to scope
one session to multiple contexts, but to a single context accessed by
multiple host names which correspond to the same physical host (the
default host in server.xml).

So, if the DNS for both baz.foo.com and bar.foo.com resolves to the
same IP, a request to /myapp for baz.foo.com will create a session
with a JSESSIONID cookie domain of .foo.com, allowing requests to
bar.foo.com (or any other DNS mappings) to /myapp servlet context to
share the same HttpSession.

I took a stab at implementing this as a Valve, with some success.
My original thought was to groom the JSESSIONID cookies in the request
and response -- however, they never seem to show up (i.e. I never have
any cookies available from HttpRequest::getCookies() or
HttpResponse::getCookies()).  Perhaps I just attached the Valve at the
wrong spot (in the config file)?  Because I haven't been able to
access the JSESSIONID cookies, I end up getting a two cookies written
on the original request, one for the first host requested
(baz.foo.com), and another from my Valve for .foo.com (also from the
first request).  I get the desired result from this (unfortunately
with an extra cookie set for baz.foo.com), but am curious why I those
JSESSIONID cookies haven't turned up.

Any comments would be appreciated.

Dan


/*
 * $Header: $
 * $Revision: $
 * $Date: $
 *
 * 
 *
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in
 *the documentation and/or other materials provided with the
 *distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *any, must include the following acknowlegement:
 *   This product includes software developed by the
 *Apache Software Foundation (http://www.apache.org/).
 *Alternately, this acknowlegement may appear in the software itself,
 *if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names The Jakarta Project, Tomcat, and Apache Software
 *Foundation must not be used to endorse or promote products derived
 *from this software without prior written permission. For written
 *permission, please contact [EMAIL PROTECTED]
 *
 * 5. Products derived from this software may not be called Apache
 *nor may Apache appear in their names without prior written
 *permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * 
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * http://www.apache.org/.
 *
 */

package

Re: Emulating JServ's session.topleveldomain with Catalina

2001-11-21 Thread Daniel Rall

Daniel Rall [EMAIL PROTECTED] writes:

 Using Tomcat 4.0.1, is there any way to emulate JServ's
 session.topleveldomain context configuration?

 # Set the domain= header that gets sent with the cookie. This is 
 # entirely optional 
 # Default: null 
 # this is needed when we vhost to avoid multiple login 
 session.topleveldomain=.foo.com

 I would like all requests to the set of virtual hosts represented by
 the glob *.foo.com to share the same session ID.  I was hoping that
 org.apache.catalina.authenticator.SingleSignOn would handle this, but
 it did not (a new session identifier was assigned each time I visited
 a different vhost).

Note: I am not using container-managed security.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Initialization of Catalina/mod_webapp

2001-11-19 Thread Daniel Rall

I've setup Catalina 4.0.1 behind Apache/1.3.22 (Unix) via mod_webapp.
On startup (of Catalina; sleep 3; Apache), Catalina finds my
deployment descriptor distasteful (and appears to attempt multiple
initializations), and will not register my servlet zone.

I get the feeling that I'm doing something fundamentally wrong here
(or else I wouldn't be getting these lovely errors, heh).  I am
running both Apache and Catalina on high ports, but don't expect that
this has much to do with my problem.

Anyone spare a clue?



Here's a trimmed log file:

2001-11-19 09:38:23 WebappLoader[/servlets]: Deploying class repositories to work 
directory /home/dlr/SANDBOXEN/HEAD/site/work/localhost/servlets 
[snip deploy of long list of JARs and other startup]
2001-11-19 09:38:24 StandardManager[/servlets]: Loading 0 persisted sessions 
2001-11-19 09:38:24 StandardManager[/servlets]: Finish: Loading persisted sessions 
2001-11-19 09:38:25 ContextConfig[/servlets] Configuration error in application 
web.xml 
java.lang.IllegalArgumentException: Duplicate context initialization parameter SANDBOX 
at 
org.apache.catalina.core.StandardContext.addParameter(StandardContext.java:1533) 
at java.lang.reflect.Method.invoke(Native Method) 
at org.apache.catalina.util.xml.MethodSetter.end(XmlMapper.java:879) 
at org.apache.catalina.util.xml.XmlMapper.matchEnd(XmlMapper.java:419) 
at org.apache.catalina.util.xml.XmlMapper.endElement(XmlMapper.java:119) 
[snip]
2001-11-19 09:38:25 ContextConfig[/servlets]: Marking this application unavailable due 
to previous error(s) 
2001-11-19 09:38:25 StandardContext[/servlets]: Error initializing naming context for 
context /servlets 
2001-11-19 09:38:25 StandardContext[/servlets]: Context startup failed due to previous 
errors 
[snip]
2001-11-19 09:38:25 StandardManager[/servlets]: Unloading complete 
2001-11-19 09:38:25 StandardHost[localhost]: Installing web application at context 
path /myapp from URL file:/home/dlr/SANDBOXEN/HEAD/site/webapps/myapp 
[snip repeat of above]
2001-11-19 09:38:26 [org.apache.catalina.connector.warp.WarpConnector] Connection from 
localhost/127.0.0.1:2611 to localhost/127.0.0.1:11025 
2001-11-19 09:38:26 [org.apache.catalina.connector.warp.WarpConnector] Connection from 
localhost/127.0.0.1:2612 to localhost/127.0.0.1:11025 
2001-11-19 09:38:26 WarpHost[sc-dev2.sp.collab.net]: Installing web application at 
context path /servlets from URL file:/home/dlr/SANDBOXEN/HEAD/site/webapps/myapp 
2001-11-19 09:38:26 [org.apache.catalina.connector.warp.WarpConnector] Connection from 
localhost/127.0.0.1:2613 to localhost/127.0.0.1:11025 
2001-11-19 09:38:26 [org.apache.catalina.connector.warp.WarpConnector] Connection from 
localhost/127.0.0.1:2614 to localhost/127.0.0.1:11025 
2001-11-19 09:38:26 [org.apache.catalina.connector.warp.WarpConnector] Connection from 
localhost/127.0.0.1:2615 to localhost/127.0.0.1:11025 
2001-11-19 09:38:26 WebappLoader[/servlets]: Deploying class repositories to work 
directory /home/dlr/SANDBOXEN/HEAD/site/work/sc-dev2.sp.collab.net/servlets 
[snip deploy of long list of JARs and other startup]
2001-11-19 09:38:26 StandardManager[/servlets]: Seeding of random number generator has 
been completed 
2001-11-19 09:38:27 ContextConfig[/servlets] Configuration error in application 
web.xml 
java.lang.IllegalArgumentException: Duplicate context initialization parameter SANDBOX 
[repeat of Catalina-internal stack trace shown above]


Here's my mod_webapp Apache config:

LoadModule webapp_module /usr/lib/apache/mod_webapp.so 
AddModule mod_webapp.c 
  
WebAppConnectionconnwarplocalhost:11025 
WebAppDeploymyappconn/servlets 


Here's the relevant portions of my web.xml:

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN
  http://java.sun.com/j2ee/dtds/web-app_2.2.dtd;

web-app

  display-nameMyApp/display-name
  description
Collaborative development framework
  /description

  !-- Both SANDBOX (web application root) and TURBINE_RESOURCES (path
   to TR.props relative to web app root) are needed by TurbineConfig --

  context-param
param-nameSANDBOX/param-name
param-value/home/dlr/sandbox/param-value
description
  The full file system path to this Myapp installation.
/description
  /context-param

  context-param
param-nameTURBINE_RESOURCES/param-name
param-valueconf/TurbineResources.properties/param-value
description
  The file system path to the Turbine/Fulcrum/Torque configuration
  file relative this Myapp installation's root directory.
/description
  /context-param

[snipped remainder for brevity's sake]

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Apache 1.3.22 Tomcat 4.0.1-- Connector issue

2001-11-19 Thread Daniel Rall

Prasad Kallimath [EMAIL PROTECTED] writes:

 Just wondering if anybody had success in tying Tomcat4
 with Apache. I tried looking at the archive, but could
 not get any helpful info.
[snip]
 I followed the steps mentioned in the INSTALL.txt in
 the Mod_Webapp package.
[snip]
 [Sun Nov 18 18:46:46 2001] [error] Connection conn
 cannot connect
 [Sun Nov 18 18:46:46 2001] [error] Cannot open
 connection conn

Hi Prasad.  I'm attempting a similar configuration to what you
describe here.  I also hit the problem you describe -- mod_webapp is
trying to connect to Catalina before Catalina is initialized and
listening on the specified port (therefore mod_webapp's socket
connection cannot be established).  I worked around this problem (on
Linux) by putting a `sleep 3` in my startup script in between startup
of Catalina and Apache.

 Daniel Rall

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Triple initialization of Catalina/mod_webapp

2001-11-19 Thread Daniel Rall

Let's play Find The Misconfiguration!

My server.xml for Catalina plus mod_webapp (comments removed):

Server port=8005 shutdown=SHUTDOWN debug=0

  Service name=Tomcat-Apache

Connector className=org.apache.catalina.connector.warp.WarpConnector
   port=11025 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0 connectionTimeout=6/

!-- Define the top level container in our container hierarchy --
!-- See the following URL for a good configuration description:
 http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg34591.html
--
Engine name=Apache defaultHost=localhost debug=0
className=org.apache.catalina.connector.warp.WarpEngine

  Logger className=org.apache.catalina.logger.FileLogger
  directory=../log/debug prefix=catalina suffix=.log
  timestamp=true/

  Realm className=org.apache.catalina.realm.MemoryRealm /

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps unpackWARs=true

Valve className=org.apache.catalina.valves.AccessLogValve
   directory=../log/access prefix=catalina_access suffix=.log
   pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
directory=../log/debug prefix=catalina suffix=.log
timestamp=true/

Context path=/servlets docBase=myapp
 reloadable=true debug=0
   Loader checkInterval=1
   className=org.apache.catalina.loader.WebappLoader/
   Manager debug=99/
/Context

  /Host

/Engine

  /Service

/Server

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Triple initialization of Catalina/mod_webapp

2001-11-19 Thread Daniel Rall

Let's play Find The Misconfiguration!

My server.xml for Catalina plus mod_webapp (comments removed):

Server port=8005 shutdown=SHUTDOWN debug=0

  Service name=Tomcat-Apache

Connector className=org.apache.catalina.connector.warp.WarpConnector
   port=11025 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0 connectionTimeout=6/

!-- Define the top level container in our container hierarchy --
!-- See the following URL for a good configuration description:
 http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg34591.html
--
Engine name=Apache defaultHost=localhost debug=0
className=org.apache.catalina.connector.warp.WarpEngine

  Logger className=org.apache.catalina.logger.FileLogger
  directory=../log/debug prefix=catalina suffix=.log
  timestamp=true/

  Realm className=org.apache.catalina.realm.MemoryRealm /

  !-- Define the default virtual host --
  Host name=localhost debug=0 appBase=webapps unpackWARs=true

Valve className=org.apache.catalina.valves.AccessLogValve
   directory=../log/access prefix=catalina_access suffix=.log
   pattern=common/

Logger className=org.apache.catalina.logger.FileLogger
directory=../log/debug prefix=catalina suffix=.log
timestamp=true/

Context path=/servlets docBase=myapp
 reloadable=true debug=0
   Loader checkInterval=1
   className=org.apache.catalina.loader.WebappLoader/
   Manager debug=99/
/Context

  /Host

/Engine

  /Service

/Server

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




double post

2001-11-19 Thread Daniel Rall

My apologies for the double post -- my SSH connection to my email
client dropped as I was sending the first copy of the message.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: Does jakarta-tomcat-service work for *nixes?

2001-11-19 Thread Daniel Rall

Chris Tucker [EMAIL PROTECTED] writes:

 You probably want to look at running Tomcat in conjunction with a real
 web-server (such as Apache) if you're concerned (rightly) about running
 Tomcat as root.  Use mod_jk or mod_webapp and connect Tomcat to Apache
 running as root and just map stuff across to Tomcat appropriately.  Tomcat
 then doesn't need rights to the low-numbered ports and so can be run as a
 non-root user.

Does anyone have a good reference on running Catalina w/ mod_webapp?
The INSTALL.txt document doesn't cut it.

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]