Re: auto generating web.xml

2000-11-22 Thread Rachel Greenham

On Tuesday 21 November 2000 19:36, you wrote:
 Hi Rachel,
 Just wondering how do you plan to auto generate these web.xml files and how
 would you input the criteria. Thanks for the feedback.

Well, we haven't finalized it yet, but we do have a class naming scheme for 
our servlet classes, so it might be as simple as writing a script that does a 
search for "*Servlet.class" and creates aliases based on the rest of the name 
preceding that. Possibly. Or we might do it a similar way to the way we're 
doing JSP TLD auto-generation, where we have a web-application written using 
the same tags which we use to document the tags, and then we generate a tld 
from that documentation. There's some benefit to that as the configuration 
arises out of the documentation, which we need anyway, so it should stay in 
sync.

-- 
Rachel



Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-21 Thread Rachel Greenham

On Monday 20 November 2000 19:16, you wrote:

 As I have written several times before, there is *no* standard for the
 invoker service (/servlet/* or /servlets/*).  It is *not* part of the
 servlet specification

Well, this was essentially my original question - I missed your earlier 
pronouncements on the matter - I joined the list specifically to ask the 
question after an answer didn't come up on searching the archives.

 What *is* in the standard is the servlet mappings that are defined in the
 2.2 specification, which you can download at
 http://java.sun.com/products/servlet/download.html.  This is the only
 thing you can count on being portable.

That's what I reckoned; I've been poring over the specification. We *are* 
going over to using servlet aliases - we're just going to write up something 
that auto-generates our WEB-INF/web.xml. We're already auto-generating our 
.tld files.

-- 
Rachel



Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-20 Thread Rachel Greenham

On Saturday 18 November 2000 00:29, you wrote:
 As of Tomcat 3.2-b8 (to be created on Monday), you will be able to set a
 parameter in the server.xml file to override the prefix used by the invoker
 servlet.  There is an entry that looks like this:

 RequestInterceptor
 className="org.apache.tomcat.request.InvokerInterceptor"
 debug="0" prefix="/servlet/" /

 and you can change the prefix attribute to "/servlets/" for your particular
 case.

I already did this, on 3.2b7, the same solution works already. That's how I 
resolved the issue for now, but I wasn't happy with it, because our webapps 
weren't compatible between 3.1 and 3.2, which was worrying to say the least. 
What's needed is a *standard* solution to this problem that will work across 
all API-compliant servlet containers - ie: defined in the WEB-INF/web.xml for 
the webapp. Or I need to know for sure that there is no such standard 
solution and we should be using aliases for all our servlets. I had another 
look through the API specification and to me it looks like the latter, which 
would be a major pain.

 In Tomcat 4.0, the ability to configure global defaults in the
 "conf/web.xml" file is restored to the way it worked in Tomcat 3.1 -- it is
 much more intuitive for things like this.

Because we're trying to write nice well-behaved webapps, we don't want to 
have to change a global setting, only a local-to-webapp setting. I was able 
to do this on Tomcat 3.1.

-- 
Rachel



Re: System properties

2000-11-17 Thread Rachel Greenham

On Friday 17 November 2000 14:27, you wrote:
 Hi,

 I was wondering if it is possible to pass properties to Tomcat.  I have
 some classes which read various system properties in their static
 initializers, and this works fine when using these classes on the command
 line using "java -Dproperty=value".  However I am not sure how to pass
 these properties into tomcat when I start it.  Is there something in one of
 the XML files?

yes, you can do it, by supplying it in TOMCAT_OPTS when invoking Tomcat.

However, it's ugly and results in non-portable web applications (you need to 
set the properties on whatever servlet container is being used, and restart 
it, and some may not allow you to set such things). It would be *better* to 
put the properties you want into some config file specific to your web 
application, in WEB-INF, to be loaded through ServletContext.getResource(), 
or as servlet init parameters. Static initialisers? Ugh. Specify instead that 
your servlets are to be initialised and get the data then. Self-containment 
is the watchword for web applications.

-- 
Rachel



Re: will pay money for tomcat install

2000-11-14 Thread Rachel Greenham

On Tuesday 14 November 2000 16:51, you wrote:
 If you can install tomcat with virtual hosts on a RH linux 6.1 box, then I
 will pay you money. I have no more hair to pull out..

If you haven't already, use Tomcat 3.2 - it has support for virtual hosting 
which Tomcat 3.1 did not. Not properly at any rate. In Tomcat 3.2, look in 
the conf/server.xml file at the bottom for hints and a template.

-- 
Rachel