Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED

2005-07-22 Thread Chris Brown

An update on the problem

Reading through some other posts I got the suspicion that errno=13 was 
privilege related. On a hunch turned off SELINUX 
(http://fedora.redhat.com/docs/selinux-faq-fc3/index.html#id2825232) and 
everything worked great! The next step is to figure out how to run with it 
back on, but that got me going again.



- Original Message - 
From: Chris Brown [EMAIL PROTECTED]

To: Tomcat Users List tomcat-user@jakarta.apache.org
Sent: Thursday, July 21, 2005 4:06 PM
Subject: Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED


Hello, Sorry for not replying to the thread referenced in my subject (See 
July 1st, 2005), I'm new to the list and didn't have the email to reply 
to.


I am having the same trouble that Paul and Steve encountered. (Error 
connecting to tomcat from mod_jk). Like Steve I have two similarly 
configured machines, one works, one doesn't. I can provide configuration 
files and more detailed logs but the errors I get are similar. Maybe I can 
peek someone's interest or jog a memory by proviging more detail.


I'm running two identically configured Fedora Core 4 boxes. The one that 
works is running on a Pentium II 450mhz running (FC4 i386), the one that 
doesn't work is running on a Xeon 2.8ghz (FC4 x86_64).


I've compiled mod_jk v1.2.14.1 from source on each box configured 
everything with simple settings from the tomcat connector HOWTOs. I'm 
running apache 2.0.54-10. I also tried downloading a precompiled binary 
(jakarta-tomcat-connectors-jk-1.2.10-linux-sles9-x86_64-prefork.so) but 
didn't have any better results.


I tried pointing the working box's workers.properties file to the other 
boxes tomcat to confirm tomcat was in fact listening on port 8009. That 
worked.


I turned off my firewall to ensure that wasn't the issue. below is the log 
from mod_jk. I can provide one with debug message but thought I'd start 
with the shorter version.


Thanks for any help on this matter, I'm stumped.
Chris Brown

[Thu Jul 21 00:18:16 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): 
Attachning shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): 
connect to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info] 
ajp_connect_to_endpoint::jk_ajp_common.c (889): Failed opening socket to 
(127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c 
(1248): Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): 
Sending request to tomcat failed,  recoverable operation attempt=1
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): 
connect to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info] 
ajp_connect_to_endpoint::jk_ajp_common.c (889): Failed opening socket to 
(127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c 
(1248): Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): 
Sending request to tomcat failed,  recoverable operation attempt=2
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): 
connect to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info] 
ajp_connect_to_endpoint::jk_ajp_common.c (889): Failed opening socket to 
(127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c 
(1248): Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): 
Sending request to tomcat failed,  recoverable operation attempt=3
[Thu Jul 21 00:18:21 2005] [error] ajp_service::jk_ajp_common.c (1758): 
Error connecting to tomcat. Tomcat is probably not started or is listening 
on the wrong port. worker=ajp13w failed
[Thu Jul

Re: Apache2+jk+tomcat5.028+uri utf-8 [NOT] SOLVED

2005-07-21 Thread Chris Brown
Hello, Sorry for not replying to the thread referenced in my subject (See July 
1st, 2005), I'm new to the list and didn't have the email to reply to. 

I am having the same trouble that Paul and Steve encountered. (Error connecting 
to tomcat from mod_jk). Like Steve I have two similarly configured machines, 
one works, one doesn't. I can provide configuration files and more detailed 
logs but the errors I get are similar. Maybe I can peek someone's interest or 
jog a memory by proviging more detail.

I'm running two identically configured Fedora Core 4 boxes. The one that works 
is running on a Pentium II 450mhz running (FC4 i386), the one that doesn't work 
is running on a Xeon 2.8ghz (FC4 x86_64).

I've compiled mod_jk v1.2.14.1 from source on each box configured everything 
with simple settings from the tomcat connector HOWTOs. I'm running apache 
2.0.54-10. I also tried downloading a precompiled binary 
(jakarta-tomcat-connectors-jk-1.2.10-linux-sles9-x86_64-prefork.so) but didn't 
have any better results.

I tried pointing the working box's workers.properties file to the other boxes 
tomcat to confirm tomcat was in fact listening on port 8009. That worked.

I turned off my firewall to ensure that wasn't the issue. below is the log from 
mod_jk. I can provide one with debug message but thought I'd start with the 
shorter version.

Thanks for any help on this matter, I'm stumped.
Chris Brown

[Thu Jul 21 00:18:16 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] init_jk::mod_jk.c (2356): Initializing 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:17 2005] [error] jk_child_init::mod_jk.c (2312): Attachning 
shm:/etc/httpd/logs/jk-runtime-status errno=13
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=1
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=2
[Thu Jul 21 00:18:21 2005] [info]  jk_open_socket::jk_connect.c (444): connect 
to 127.0.0.1:8009 failed with errno=13
[Thu Jul 21 00:18:21 2005] [info]  ajp_connect_to_endpoint::jk_ajp_common.c 
(889): Failed opening socket to (127.0.0.1:8009) with (errno=13)
[Thu Jul 21 00:18:21 2005] [info]  ajp_send_request::jk_ajp_common.c (1248): 
Error connecting to the Tomcat process.
[Thu Jul 21 00:18:21 2005] [info]  ajp_service::jk_ajp_common.c (1749): Sending 
request to tomcat failed,  recoverable operation attempt=3
[Thu Jul 21 00:18:21 2005] [error] ajp_service::jk_ajp_common.c (1758): Error 
connecting to tomcat. Tomcat is probably not started or is listening on the 
wrong port. worker=ajp13w failed
[Thu Jul 21 00:18:21 2005] [info]  service::jk_lb_worker.c (662): service 
failed, worker ajp13w is in error state
[Thu Jul 21 00:18:21 2005] [info]  service::jk_lb_worker.c (712): All tomcat 
instances are busy or in error state
[Thu Jul 21 00:18:21 2005] wlb 192.168.0.10 0.001245

[Thu Jul 21 00:18:21 2005] [info]  jk_handler::mod_jk.c (1971): Service error=0 
for worker=wlb


Re: Memory leak with ThreadGroups - and other stuff

2003-01-24 Thread Chris Brown
Quick follow-on question for Craig...

If you put a JDBC driver in your webapp's /WEB-INF/lib directory, then as
that gets registered with DriverManager, what happens when you reload a
context?  If the DriverManager maintains a reference to the Driver loaded
with the webapp classloader, that must surely cause a few problems for
cleaning up the classloader...

Should this sort of problem disappear with
DriverManager.deregisterDriver() ?  Are there other pitfalls of this sort
in the standard Java APIs (I'm thinking of some classes with factory methods
and helpful internal caching of instances created via such factory
methods...)

- Chris

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
Sent: Friday, January 24, 2003 1:49 AM
Subject: RE: Memory leak with ThreadGroups

 If your application is well behaved (i.e. it doesn't have classes in
 common/lib or shared/lib that maintain references to things loaded from
 the webapp), then this will cause the entire webapp to become garbage.  If
 *any* references to *any* classes inside the webapp still exist, though,
 then essentially nothing from your webapp can be collected.




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




Re: unpackWARs=false?

2002-12-17 Thread Chris Brown

Hi,

If you set this property, that's (almost) all you have to do.  You don't
need to add anything else to a standard server.xml, all you do is drop the
.war file into Tomcat's /webapps folder.  Check the logs generated by
Tomcat if you can't get any further...

- Chris

- Original Message -
From: Andoni [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, December 17, 2002 11:14 AM
Subject: unpackWARs=false?


 Has anybody been able to deploy .war files with this set?

 unpackWARs=false

 If so can you post a mocked up part of your server.xml and directory
 structure please.

 Andoni.


 --
 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]




Re: Using JNDI URLs for embedded XML DTDs, to avoid hard-coding

2002-11-04 Thread Chris Brown

Hi Craig / anyone else following thread,

I agree that this would work if I manually retrieved the URL as a String
environment entry from JNDI, then passed that to the constructor of
java.net.URL ... but I could do the same reading a context init-param (for
example).

What I need is some way in which I can store a URL object in JNDI so that
when an XML parser is reading through an XML document, it can read the DTD
directly from the URL.  I'd like to be able to validate XML documents
automatically, but unless I write a URL resolver and plug it into a parser
(which is quite complicated, as it's used for resolving everything, not just
the DTD, I'm a bit stuck for controlling validation, unless the default
resolver can read directly from the specified DTD.

Thanks,
Chris

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, October 31, 2002 6:34 PM
Subject: Re: Using JNDI URLs for embedded XML DTDs, to avoid hard-coding




 On Thu, 31 Oct 2002, Chris Brown wrote:

  Date: Thu, 31 Oct 2002 09:28:18 +0100
  From: Chris Brown [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: tomcat-user [EMAIL PROTECTED]
  Subject: Using JNDI URLs for embedded XML DTDs, to avoid hard-coding
 
 
  Hello all,
 
  Any ideas as to how I can make an XML DTD/Schema available via a JNDI
URL
  within Tomcat?

 The simplest way to do this is to use a JNDI environment entry that
 defines the URL (as a String) and sticks it in the JNDI naming context for
 you.  The actual value to be used is configured in server.xml (or
 your context config file under 4.1).

 Nested in your Context element, you'd set up something like this:

   Context path=... ...
 ...
 Environment name=url type=java.lang.String
 value=http://.../
 ...
   /Context

 and access it from your application like this:

   InitialContext ic = new InitialContext();
   String url = (String) ic.lookup(java:comp/env/url);

 In this way, you can deploy the same WAR unchanged, in different
 environments, by tweaking things in the server.xml file.

 A similar alternative would be to use a context initialization parameter,
 which Tomcat lets you configure in server.xml with a Parameter element,
 and retrieve it with:

   ServletContext sc = ... context instance passed to your class ...;
   String url = sc.getInitParameter(url);

 In either case, the configured value will be available in the
 contextInitialized() method of a ServletContextListener, or at any other
 time during the execution of your application.

 Craig


 --
 To unsubscribe, e-mail:
mailto:tomcat-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:tomcat-user-help;jakarta.apache.org






--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Using JNDI URLs for embedded XML DTDs, to avoid hard-coding

2002-10-31 Thread Chris Brown

Hello all,

Any ideas as to how I can make an XML DTD/Schema available via a JNDI URL
within Tomcat?

I have a web application to deploy.  For simplicity, and to simplify
upgrades without worrying about new/modified/deleted files between versions,
I deploy it as a WAR file.

The application can import external XML documents, which must conform to a
specific DTD.  The DTD URL cannot be a file: URL, because it'll be
deployed in several places, on various platforms.  It cannot be a http:
URL pointing to a reference server, as the application won't always be able
to connect to the Internet (and because it's relatively slow); furthermore,
it cannot be a URL referring back to the server where the webapp is
deployed, because some references to XML files are required during the
contextInitialized event (for configuration)... webapp content, i.e.:
servlets, etc., aren't available until the event listener has  finished
running.

One idea I had was to declare the URL for the DTD as a JNDI URL for a
ServletContext ResourcePath; with Tomcat, this is implemented as a JNDI URL,
but I'm not sure if this is something that I can count on in all servlet
engines (the JNDI URL might differ, and the URL is not required to JNDI at
all if I understand well the Servlet API specs.).

However, the above idea did make me wonder if I could use JNDI explicitly
within server config/deployment descriptor to expose DTDs.  I had thought of
adding a reference to the DTD using a resource path URL into the JNDI
context at startup, before attempting to open any XML documents with a
corresponding JNDI URL, but I'm not sure about the feasibility of this.

Or am I better to implement my own simple JNDI service provider, in
*addition* to any service providers (such as Tomcat's...), to resolve
certain names, and retrieve corresponding documents?  It seems a bit
daunting, as I'm still a bit inexperienced with JNDI...

In any case, even if I could add a reference to the DTD using a JNDI URL,
I'm not sure what would happend when the XML parser attempts to open the
input stream on a connection to such a URL.  All I can see are references to
some very basic types, such as java.lang.String and object factories, for
configuring JNDI resources: I'm not sure if I could specify an InputStream,
a URL, or whatever here... :-(

Hopefully someone will find this an interesting subject to pick up on!

Thanks,
Chris B.



--
To unsubscribe, e-mail:   mailto:tomcat-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org




Mapping filename extensions to MIME types automatically

2002-09-23 Thread Chris Brown


Hello,

I have a webapp that sometimes lets a user copy a web page from a remote
site into a local directory on the server where my webapp runs (it's for a
large global intranet).

In some cases, the pages downloaded may be named .html, .pdf, or
whatever, so it's easy to serve up the downloaded copies later on, as the
servlet that fetches these files off the local disk can use the
getMimeType method of the ServletContext.  However, when I download a
document from a page such as a JSP, PHP, or ASP script, although I know the
document's MIME type, I don't *automatically* know the appropriate filename
extension, so for example, I've know way of knowing that if script.jsp
sends me an Adobe Acrobat document (with the appropriate MIME type) that I
should save it as PDF.

At present, I have two options:

* hard-code the mappings between MIME types and filename extensions

* create a mapping for each file, where the MIME type is stored in some sort
of index on disk alongside the file

I've chosen the first option at present, because the second option is very
difficult to backup reliably given our network configuration.

What I'd like to do is just read the mime-mapping elements in web.xml, so
that I can read in such mappings dynamically.  This should be easy enough,
except that normally the web.xml file embedded in a webapp only contains
mappings that override the default mappings.  In tomcat for example, these
are defined in the default web.xml file, but I've no portable method of
reading this (i.e.: in other servlet containers, this information may be
defined differently and stored elsewhere.

Any ideas as to how I can access this information in a portable way?  It
seems wasteful to redefine information that's already available...

Thanks
Chris B.



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




Classloaders, JDBC drivers (etc.), and reloading webapps with the /manager

2002-09-23 Thread Chris Brown


Hello,

If I include a JAR file for a JDBC driver within my webapp's /WEB-INF/lib
path, calling Class.forName(some.driver) registers the driver with the
java.sql DriverManager.  No problem... until I reload the context using the
/manager webapp.

Is the class definition (and in particular, the driver instance) still
valid, given that the classloader used for the driver (and all classes
loaded by it, including the driver) will have been reloaded ?

Thanks,
Chris B.



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




[TC4.0.4] MAPPING configuration error for request URI message in logs, but request processed okay

2002-09-18 Thread Chris Brown


Hello,

I've seen the following message appear in my logs (Tomcat's main servlet
log):

StandardHost[localhost]: MAPPING configuration error for request URI

I'm testing stuff on localhost (I'm the only user, and I'm trying one
message at a time), and this error is reported, yet nothing seems to be
going wrong.  Am I missing something that I should be correcting?

Thanks
- Chris



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




SOLVED: [TC4.0.4] MAPPING configuration error for request URI message in logs, but request processed okay

2002-09-18 Thread Chris Brown


I had defined three servlets in web.xml

I called one, it worked, yet I saw the error message being logged (read my
original message, below).  It appeared due to a one-letter spelling mistake
in another servlet definition.

My mistake, but the error message wasn't too clear.

- Chris

- Original Message -
From: Chris Brown [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Wednesday, September 18, 2002 5:16 PM
Subject: [TC4.0.4] MAPPING configuration error for request URI message in
logs, but request processed okay



 Hello,

 I've seen the following message appear in my logs (Tomcat's main servlet
 log):

 StandardHost[localhost]: MAPPING configuration error for request URI

 I'm testing stuff on localhost (I'm the only user, and I'm trying one
 message at a time), and this error is reported, yet nothing seems to be
 going wrong.  Am I missing something that I should be correcting?

 Thanks
 - Chris



 --
 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]




Re: global.jsa

2002-09-11 Thread Chris Brown


You seem to have implemented the correct interfaces.  However, I've not seen
your web.xml deployment descriptor.  You'll need to refer to your class in
two separate places in web.xml in order for both event types (session and
application) to be sent to your class.  I suspect that the servlet engine
will create one separate instance of the class for listening to application
start/stop and another for session activation/deactivation.

If you really need to store everything in one instance of the class, you
could always add this (the servlet context listener) as a servlet context
attribute, and then when a session starts or ends, call a method of the
first instance by getting the copy you put in the servlet context.  I'd
personally make two classes, for readability and simplicity though!

- Chris

- Original Message -
From: Felipe Schnack [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 10, 2002 8:14 PM
Subject: Re: global.jsa


   Hi!
   I saw this post of yours in the tomcat list and tried myself. For some
 reason it doesn works... you can help me? I don't know what to do, it
 works for application start/stop, but not for session.

 On Mon, 2002-09-09 at 05:51, Chris Brown wrote:
 
  Hello,
 
  I've seen a few answers to your question suggesting that you use a
servlet
  that loads on startup.  I have another suggestion that you may prefer to
  emulate global.asa: implement ServletContextListener and
  HttpSessionActivationListener.
 
  javax.servlet.ServletContextListener
 
...sends you events when the webapp starts and ends.
 
  javax.servlet.http.HttpSessionActivationListener
 
...sends you events when a session is created or destroyed.
 
  You'll find javadocs for these items in the following path with a
default
  tomcat installation, obviously relative to the root of your
installation:
 
/tomcat-docs/servletapi/index.html
 
  To use them, you'll need to add appropriate XML elements to web.xml
(refer
  to a tutorial or the web.xml DTD).  It's simple and works well.
 
  - Chris
 
  - Original Message -
  From: neal [EMAIL PROTECTED]
  To: Tomcat Users List [EMAIL PROTECTED]
  Sent: Tuesday, September 03, 2002 10:14 AM
  Subject: global.jsa
 
 
   Is there such a thing as a global.jsa file in Tomcat?
  
   I first saw this concept (an idea taken from ASP's global.asa)
implemented
   in JRUN.
  
   If there is a global.jsa, does anyone know of any docs on this?  If
not,
  is
   there an alternative? The reason I would want to use this is to
  instantiate,
   populate, and cache a few objects upon startup of the application.  If
   Tomcat does not provide a global.jsa...does anyone know how otherwise
to
   achieve the goal?
  
   Thanks.
   Neal
  
  
   --
   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]
 
 --

 Felipe Schnack
 Analista de Sistemas
 [EMAIL PROTECTED]
 Cel.: (51)91287530
 Linux Counter #281893

 Faculdade Ritter dos Reis
 www.ritterdosreis.br
 [EMAIL PROTECTED]
 Fone/Fax.: (51)32303328




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




Re: global.jsa

2002-09-09 Thread Chris Brown


Hello,

I've seen a few answers to your question suggesting that you use a servlet
that loads on startup.  I have another suggestion that you may prefer to
emulate global.asa: implement ServletContextListener and
HttpSessionActivationListener.

javax.servlet.ServletContextListener

  ...sends you events when the webapp starts and ends.

javax.servlet.http.HttpSessionActivationListener

  ...sends you events when a session is created or destroyed.

You'll find javadocs for these items in the following path with a default
tomcat installation, obviously relative to the root of your installation:

  /tomcat-docs/servletapi/index.html

To use them, you'll need to add appropriate XML elements to web.xml (refer
to a tutorial or the web.xml DTD).  It's simple and works well.

- Chris

- Original Message -
From: neal [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, September 03, 2002 10:14 AM
Subject: global.jsa


 Is there such a thing as a global.jsa file in Tomcat?

 I first saw this concept (an idea taken from ASP's global.asa) implemented
 in JRUN.

 If there is a global.jsa, does anyone know of any docs on this?  If not,
is
 there an alternative? The reason I would want to use this is to
instantiate,
 populate, and cache a few objects upon startup of the application.  If
 Tomcat does not provide a global.jsa...does anyone know how otherwise to
 achieve the goal?

 Thanks.
 Neal


 --
 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]




FW: Anti-Alias Font Images on the Fly?

2002-05-21 Thread chris brown


Hi,

You can generate your image on an AWT graphics surface on the server, and
use standard AWT drawing techniques, or Java2D, to make more complex images.
You then need to serialise your image to a binary stream to send to the
client.

This can cause problems if your server doesn't have a graphical environment.
Even though you can create graphics without popping up windows on the
server, some graphics methods require that the host (the server) has a GUI:
not generally a problem with Windows, but on a Linux/UNIX server, you need
an X-Server or an emulation of an X-Server ... unless you're using JDK1.4,
which provides headless mode (to create server-side graphics without an
X-Server).

To send your nice anti-aliased text images to the client, you need to set
the appropriate content type (such as image/png) and use an output stream
for the servlet response.  To encode your images to the output stream, you
can install the JAI (Java Advanced Imaging) API from Sun along with your
JDK, which provides these methods, or if you're using JDK1.4, you could try
the Image I/O API (included as standard) ; I haven't tried the latter, but
it should work.

Finally, creating such images demands a lot of resources (relatively
speaking).  You're best to try and cache the images to disk whenever you
create them, and only replace them if the text to display changes.  For
subsequent requests, just copy the cached image to the output stream (by
reading from an InputStream that points to the file in the cache).

I've no example code unfortunately, but it is reasonably straightforward.

-Chris

- Original Message -
From: Marc Elliott [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 6:36 PM
Subject: Anti-Alias Font Images on the Fly?


Hello folks,

Do any of you know of a JSP/javabean/apache solution to generating nice
anti-alias type image on the fly.  I'm just sick to death of continually
cutting and re-cutting images because

1 -- a designer won't work with HTML type faces and
2 -- the the textual content keeps changing

I also have an application for building web sites in which I'd like to offer
the option of changing the pretty graphic type to the user.

Any thoughts?

Thanks!

Marc





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




request.getLocale() always returns en_US ..?!

2002-03-14 Thread chris brown


Hello,

I'm trying to use the method getLocale() on HttpServletRequest objects...
however, it always seems to return en_US!  This is despite my browser
sending fr,en-gb;q=0.5 as the accept-language header! (I've checked this
last point by calling request.getHeader(Accept-Language), including
several variations (upper  lower case, for example).  I can always get the
correct value back, but Tomcat 4.0.1 always returns en_US.

Is this a bug?  Or am I missing something?

For info., I've tried this on IE6.0 and Mozilla 0.9.8 .  Both with
appropriate language settings, both get picked up as en_US, despite
correctly-specified values in the accept-language headers.

- Chris B.



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




Passing HttpServletResponse to another thread, then sleeping in doGet until other thread is done

2002-02-18 Thread chris brown

Hello,

I have a simple data processing API that lets you plug in various types of
input and output streams.  The engine (or a subclass that does some
specific processing) is instantiated with a subclass of a data source (a
file, a socket, HTTP URL, STDIN, webapp or system resource) and data sink
(a file, a socket, STDOUT, or -- this is the problem -- a HTTP servlet
response).  The data source has it's own thread, as does the data sink
(this is so each input and output mechanism works at the optimal speed).

I'm developing a sort of simple value-added proxy using the above API.  It
reads from a HTTP URL (data source), then modifies the data contained (by
highlighting selected words), then writes it to the servlet response (data
sink).  In the servlet's doGet method, it creates the source, engine, and
sink, and passes the HttpServletResponse object to the sink in the sink's
constructor.  Only the sink ever calls response.getWriter() or
response.getOutputStream() (and of course, it doesn't call both or call
either more than once).

I suspect what's going on is that as the sink is running in a separate
thread, sometimes it's quick and behaves correctly, but more often than not,
the doGet method terminates before the run() method in the sink's main
thread.  At this point, Tomcat probably forcibly calls close() on the
output stream, and stops the sink object dead in its tracks.

As far as output is concerned, sometimes (very rarely), I get the complete
response, more often I get just the first part of the response, and even
more often still, I get nothing at all except messages on STDERR.  Here are
two examples (first is a tomcat internal message: thrown if I call close()
on the servlet output stream if it's apparently already closed by some
[Tomcat] process; second is my own message: thrown if writing to the
servlet's output stream is interrupted by some other [Tomcat] process):


java.lang.NullPointerException
 at org.apache.ajp.tomcat4.Ajp13Response.sendHeaders(Ajp13Response.java:114)
 at
org.apache.catalina.connector.HttpResponseBase.flushBuffer(HttpResponseBase.
java:739)
 at
org.apache.catalina.connector.ResponseFacade.flushBuffer(ResponseFacade.java
:212)
 at
org.apache.catalina.connector.ResponseStream.close(ResponseStream.java:224)
 at fr.reflexe.util.dataproc.HttpServletSink.run(HttpServletSink.java:203)
 at java.lang.Thread.run(Thread.java:484)


fr.reflexe.util.dataproc.HttpServletSink: java.io.IOException: Cannot write
to a closed output stream


I found a *temporary* workaround: in doGet(...), I tried:


Thread t = Thread.currentThread();
try
{
  t.sleep(1000);
  System.out.println(servlet has woken up);
}
catch (InterruptedException wakeup)
{
  System.err.println(wakeup.toString());
}


This gave the other thread the time to run, no errors were logged, and the
result was correct when viewed in the browser.  So I'd like to implement a
more intelligent solution, in which I make the thread in which doGet is
running sleep indefinitely ... or more specifically, wait until the other
thread sends a signal that it's done, by calling Object.notify() perhaps.

Would this cause any problem for Tomcat if I called sleep in this way?

How would Tomcat's thread pooling system react?

Would this have any significant impact when there are concurrent client
requests?

Am I likely to have portability problems with this type of solution if I try
to deploy on some other servlet engines, or should this not be an issue?

Thanks,
Christopher Brown



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




[TC4] Disabling JSP pages in one context only

2002-01-29 Thread chris brown

Hello,

I'd like to disable the jsp servlet for one context only.  This servlet is
declared in the global tomcat web.xml file.  I'd like to disable it in one
specific context only.

However, I don't want to remove it from the global web.xml file and then
copy it to each individual webapp's web.xml (excluding the webapp in which
JSPs should be disabled).  This is impratical, and furthermore reduces the
webapp's portability (as the JSP servlet maps to an implementing class built
in to Tomcat which is unlikely to be available in other deployment
environments.

Thanks for any suggestions,
Christopher Brown



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




Re: [TC4] Disabling (Was: JSP pages, Now: dir. listings) in one context only

2002-01-29 Thread chris brown

Thanks Craig,

I posted a similar question recently asking whether it was possible to have
different settings for the default servlet (per-context settings).  For
example, in some contexts, I'd like to see directory listings, in others,
I'd prefer not to.

I tried overriding the default servlet, but this always threw
ServletExceptions in TC4.0.1 (didn't like multiple servlets sharing the same
name between global web.xml and context-specific web.xml, but always seemed
to resort to global default servlet if I used a different servlet-name for
the default servlet in the context-specific web.xml).

Obviously I could write a directory-listing servlet myself if I disabled the
directory listing
feature globally, but I'd have problems with other static resources.  I
don't really understand how conflicting url mappings are handled between
global and context configs either...

Thanks
Chris B


- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 4:20 PM
Subject: Re: [TC4] Disabling JSP pages in one context only




 On Tue, 29 Jan 2002, chris brown wrote:

  Date: Tue, 29 Jan 2002 10:10:41 +0100
  From: chris brown [EMAIL PROTECTED]
  Reply-To: Tomcat Users List [EMAIL PROTECTED]
  To: tomcat-user [EMAIL PROTECTED]
  Subject: [TC4] Disabling JSP pages in one context only
 
  Hello,
 
  I'd like to disable the jsp servlet for one context only.  This
servlet is
  declared in the global tomcat web.xml file.  I'd like to disable it in
one
  specific context only.
 
  However, I don't want to remove it from the global web.xml file and
then
  copy it to each individual webapp's web.xml (excluding the webapp in
which
  JSPs should be disabled).  This is impratical, and furthermore reduces
the
  webapp's portability (as the JSP servlet maps to an implementing class
built
  in to Tomcat which is unlikely to be available in other deployment
  environments.
 

 If you map the *.jsp URL pattern to something else in a
 servlet-mapping, you've effectively disabled JSP for that webapp ...
 your settings override the container defaults.

  Thanks for any suggestions,
  Christopher Brown
 

 Craig


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





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




Re: 4.0.2/EJB InitialContext conflict

2002-01-29 Thread chris brown

Quick related question:

I've noticed that when using ServletContext.getResource(), Tomcat returns a
URL in which jndi:// is the protocol.  Would using the nonaming option
disable this?!

-Chris

- Original Message -
From: Remy Maucherat [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 4:25 PM
Subject: Re: 4.0.2/EJB InitialContext conflict


  I have a web/EJB application that ran in Tomcat 3.  It calls
 InitialContext()
  assuming that it will get the EJB server's service implementation of
jndi
 so
  that it can locate various enterprise beans.
 
  Within tomcat4, when I call InitialContext(), I appear to be getting
 tomcat's
  jndi implementation and not the EJB server's.
 
  How do I cause my EJB server's jndi implementation to have precedence
over
 the
  tomcat4 implementation?

 Use the nonaming command line option.
 Or you can also declare your IC implementation when launching the JVM (I
 think code has been added so that Tomcat won't override it, although
Tomcat
 will still attempt to provide the J2EE ENC functionality).

 Remy


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





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




Default servlet / directory listings: different settings per context

2002-01-24 Thread chris brown

Hello,

I'm well aware how to globally enable or disable directory listings within
Tomcat (by modifying the listings parameter of the default servlet).
However, I don't know how to set this up correctly context-by-context.
Here's what I've tried:

- copying the servlet and servlet-mapping elements as-is from the
global web.xml to the web.xml of a particular context.  This doesn't work,
as the context is not initialised due to the duplicate servlet definition.

- copying the servlet and servlet-mapping elements from the global
web.xml to the web.xml of a particular context, but changing the name in
both elements to default2.  The context starts, but the servlet is never
invoked (the default global servlet seems to intercept and process the
request, because the request is handled as expected from the global web.xml,
but not according to the params of the context's web.xml).

I don't want to remove the global definition of the default servlet,
because that becomes somewhat tedious if I've got to copy it to each context
I deploy.  This is also unsuitable when I wish to deploy a WAR file, as I
have to unpack it and modify it's web.xml.  Furthermore, I can't leave the
default servlet's definition in any redistributable webapp that I create,
because it's not guaranteed that the implementing class
(org.apache.catalina.servlets.DefaultServlet) will be available on other
servlet version, or if the class is the same version.

How can I achieve the desired configuration?

Thanks in advance,
-Chris B.



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




Tomcat 4.0.1 RPMs: installation fails, even as root

2002-01-17 Thread chris brown

I can't get Tomcat 4 to install under Linux using the 4.0.1 RPMs
(specifically, tomcat4-4.0.1-1.src.rpm).

Even as root, it fails with the following message:
error: unpacking of archive failed on file /usr/bin: cpio: chown failed -
file system is read only

I'm a bit of a linux novice - can someone tell me how to fix this?

Thanks,
Chris B.



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




Re: Tomcat 4.0.1 RPMs: installation fails, even as root

2002-01-17 Thread chris brown

I've fixed this; a security-aware admin had made /usr read-only ...

- Original Message - 
From: chris brown [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Thursday, January 17, 2002 10:48 AM
Subject: Tomcat 4.0.1 RPMs: installation fails, even as root


 I can't get Tomcat 4 to install under Linux using the 4.0.1 RPMs
 (specifically, tomcat4-4.0.1-1.src.rpm).
 
 Even as root, it fails with the following message:
 error: unpacking of archive failed on file /usr/bin: cpio: chown failed -
 file system is read only
 
 I'm a bit of a linux novice - can someone tell me how to fix this?
 
 Thanks,
 Chris B.
 
 
 
 --
 To unsubscribe:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]
 
 



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




Tomcat 4.0.1 webapps RPM - corrupt images in examples context

2002-01-17 Thread chris brown

I've got Tomcat 4.0.1 working from the noarch RPM + webapps RPM.  All
seems okay, except that the images in the examples context are corrupt...

What could the problem be, and how can this be fixed?

Thanks,
Chris B.



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




[TC4.0.1] - catalina.out : an irrecoverable stack overflow has occured

2002-01-17 Thread chris brown

I've setup of TC4.0.1, based on the RPMs, and everything seems ok (apart
from the corrupt images I mentioned in a previous post to this list).

But to be sure, I checked catalina.out, as generated in the logs
directory.  Every time I start up Tomcat, the same message repeats itself
over and over:

An irrecoverable stack overflow has occured.

This appears as the first line of catalina.out, and is followed by these
two lines (seems normal enough to me):

Starting service Tomcat-Standalone
Apache Tomcat/4.0.2

...and then I get the first message about stack overflow repeating itself
again for the next 31 lines (the lines are added in a matter of seconds,
then nothing more is added).

This seems to be a startup problem, but I don't know what causes it, and
what I should do about it...  I'm using Sun's 1.3.1 JDK on Linux, if that's
an issue.

Thanks,
Chris B.





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




Getting Tomcat 4.0.1 working with IIS

2002-01-14 Thread chris brown

Help!

I can only find a HOWTO / reference info for Tomcat 3.3 and IIS... I'm
having difficulty applying this in Tomcat 4.0.1, as although I can get an
(apparently beta) Ajp13 connector running, I can't get a Ajp12 connector
running (which is required, according to the HOWTO).

If anyone can help me, please do so !  (maybe point me to a HOWTO, a
previous message -- I have tried searching the archives, but this was slow
and had difficulty finding relevant posts --, or - even better - post a
message to say what I need to do).

Thanks,
Chris Brown

PS: the HOWTO I'm referring to is
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-iis-howto.html


- Original Message -
From: Reynir Hübner [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Saturday, January 05, 2002 3:17 AM
Subject: RE: Tomcat 4.01, IIS and JSPs


we´re using tomcat 4.01 with mod_jk in production with IIS 5.0 with
isapi_redirect.dll, with out problems.

Does this little program have anything that the usual mod_jk, and
isapi_redirect.dll doesn´t have ?

bye
[EMAIL PROTECTED]





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




Configuring IIS 5.0 with Tomcat 4.0.1 - working!

2002-01-14 Thread chris brown

Thanks to everyone who provided me with suggestions. I got it working by
useful the files and steps described at:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ajp.html
http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/

One other thing took a while to fix... but that's the fault (well, a
feature) of IIS.  I didn't install Tomcat within the inetpub directory,
so my folders only had Windows security permissions allowing the current
Windows user or the administrator to access my Tomcat webapp files, NOT the
default anonymous internet access windows account.  Once I authorised the
appropriate users to access the folders for my webapp, I could access the
site via IIS.  I had to do this for the jakarta alias too.

Thanks for the help, hope this helps others too!

- Chris



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




Re: Problems using same port for several services (even with different IP / hostname)

2002-01-11 Thread chris brown

Jeff,

It's set to the default -- 8005.  As I'm running under Windows 2000, there
aren't any restrictions with port 80.

Thanks,
Chris

- Original Message -
From: PELOQUIN,JEFFREY (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:30 PM
Subject: RE: Problems using same port for several services (even with
different IP / hostname)


Chris,

what is your server port set to e.g. Server port=11085
shutdown=SHUTDOWN debug=1

if you run your http connector on 80, this value would have to be something
other 80

Also, does the user under which the tomcat service runs have sufficient
privledge to
listen on a port  1024?

Jeff

-Original Message-
From: chris brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 10:16 AM
To: Tomcat Users List
Subject: Re: Problems using same port for several services (even with
different IP / hostname)


I suspect that for some reason, despite my having specified the host address
for tomcat in the Connector for the HTTP service, Tomcat is somehow still
trying to bind to all available IP addresses on the machine.  The other two
port 80 services don't conflict with each other.

Unfortunately, much as I like Unix/Linux, I'm working with a Microsoft
platform (for a client).

I like your suggestion however.  Does anyone know an equivalent command for
Win2k?

-Chris

- Original Message -
From: Jolet, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 4:40 PM
Subject: RE: Problems using same port for several services (even with
different IP / hostname)


I think that depends on how you set up the listen, doesn't it?  if you have
application A listen on ALL interfaces on port 80, then application B that
starts up later will be blocked.  However, if application A starts up and
listens on 10.10.10.10:80, then B can listen on 10.10.10.11:80.  in the
latter case, a netstat -a|grep LISTEN (on unix) will show 10.10.10.10:80,
not *:80, which it would in the former case.  Am I correct?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 9:47 AM
To: Tomcat Users List
Subject: AW: Problems using same port for several services (even with
different IP / hostname)


You are wrong!!!

Of course one can have serveral services listening on port 80 on
one machine if each service used a unique virtual interface (IP).

That's true for unix, linux and windows .

 -Ursprüngliche Nachricht-
 Von: Tom Drake [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 10. Januar 2002 16:40
 An: Tomcat Users List
 Betreff: Re: Problems using same port for several services (even with
 different IP / hostname)
snip/
 Contrary to your statement below, only one process may bind to the
 same port (80 in this case) at the same time.
snip/

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

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





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

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





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




Re: Problems using same port for several services (even with different IP / hostname)

2002-01-11 Thread chris brown

I've tried both the hostname and the IP address.

All other services (IIS, Inktomi) bind correctly to the other
addresses/hostnames that were assigned.

-Chris

- Original Message -
From: PELOQUIN,JEFFREY (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 6:47 PM
Subject: RE: Problems using same port for several services (even with
different IP / hostname)


Chris, one more question.

What is the host name specified in the engine element associated with the
Tomcat Server in server.xml?  Is it truly the host name for the ip address
you had set up for Tomcat?

Jeff

-Original Message-
From: chris brown [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 10:16 AM
To: Tomcat Users List
Subject: Re: Problems using same port for several services (even with
different IP / hostname)


I suspect that for some reason, despite my having specified the host address
for tomcat in the Connector for the HTTP service, Tomcat is somehow still
trying to bind to all available IP addresses on the machine.  The other two
port 80 services don't conflict with each other.

Unfortunately, much as I like Unix/Linux, I'm working with a Microsoft
platform (for a client).

I like your suggestion however.  Does anyone know an equivalent command for
Win2k?

-Chris

- Original Message -
From: Jolet, John [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 4:40 PM
Subject: RE: Problems using same port for several services (even with
different IP / hostname)


I think that depends on how you set up the listen, doesn't it?  if you have
application A listen on ALL interfaces on port 80, then application B that
starts up later will be blocked.  However, if application A starts up and
listens on 10.10.10.10:80, then B can listen on 10.10.10.11:80.  in the
latter case, a netstat -a|grep LISTEN (on unix) will show 10.10.10.10:80,
not *:80, which it would in the former case.  Am I correct?

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 10, 2002 9:47 AM
To: Tomcat Users List
Subject: AW: Problems using same port for several services (even with
different IP / hostname)


You are wrong!!!

Of course one can have serveral services listening on port 80 on
one machine if each service used a unique virtual interface (IP).

That's true for unix, linux and windows .

 -Ursprüngliche Nachricht-
 Von: Tom Drake [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 10. Januar 2002 16:40
 An: Tomcat Users List
 Betreff: Re: Problems using same port for several services (even with
 different IP / hostname)
snip/
 Contrary to your statement below, only one process may bind to the
 same port (80 in this case) at the same time.
snip/

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

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





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

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





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




Re: Problems using same port for several services (even with different IP / hostname)

2002-01-11 Thread chris brown

In my original posting, I included the following snippet from server XML:

 Connector className=org.apache.catalina.connector.http.HttpConnector
  address=x.x.x.x port=80 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=443
  acceptCount=10 debug=0 connectionTimeout=6/

The address was the IP address in the example, but I've also tried the
hostname.

-Chris

- Original Message -
From: David Smith [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 8:27 PM
Subject: Re: Problems using same port for several services (even with
different IP / hostname)


Have you considered the address element of Connector in server.xml.  It's
documented to restrict which IP's are bound to when specified.  Docs and
info
for it can be found on the Tomcat 4 website.

Hope this helps some

--David






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




SOLUTION: Different results between TC3/TC4 with HTC (DHTML behavior) files and IE

2002-01-11 Thread chris brown

Got it working, thanks to a bit of hard work and the advice on this list...

In $TOMCAT_HOME/conf/web.xml, add the following mime-mapping:

  mime-mapping
extensionhtc/extension
mime-typetext/plain/mime-type
  /mime-mapping

Don't forget to restart tomcat afterwards obviously!

-Chris


 chris brown [EMAIL PROTECTED] on 01/10/2002 08:57:53 AM

 Please respond to Tomcat Users List [EMAIL PROTECTED]

 To:   Tomcat Users List [EMAIL PROTECTED]
 cc:

 Subject:  Re: Different results between TC3/TC4 with HTC (DHTML
behavior)
   files and IE

  I think you need to define a MIME type for htc in web.xml. I don't know
 what
  it's supposed to be, though.

 There is no specified MIME type for HTC (I don't know why, it seems odd).
 This never stopped it working with previous versions of Tomcat or any
other
 server.  Does TC4 refuse to serve content without an associated MIME type?
 (I don't think so, as a GET request worked fine via Telnet).

 The MIME type for .htc files is text/plain.

 Any other ideas?  Anyone know what I'm talking about and have any
 experience
 with HTC files?! (other users of HTCs).

 Thanks,
 Chris

 I hope this helps.
 Thanks.
 RS

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









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





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




IIS5, Tomcat4, multiple IP addresses, same port numbers, and problems (still a bit stuck)

2002-01-11 Thread chris brown

It seems that IIS 5.0 is greedy with respect to available IP addresses.
Even if you specify that it should only listen on particular IP addresses,
if you specify a port with one IP address, it listens for requests on other
other IP addresses with the same port number.  This seems to prevent Tomcat
binding to the address (although, confusingly, Inktomi Search managed to
bind successfully to an address that IIS had claimed as its own...).

So it seems that I'm obliged to install Tomcat as an in-process ISAPI
extension for IIS (as I can't insist that our customer switch to Apache or
uses another port, due to their firewall and legacy webapps)...

Tom Drake had suggested a HOWTO link, but it relates to Tomcat 3.3.  How can
I use Tomcat 4.0.1 (and/or the upcoming 4.0.2) with IIS ?

Thanks,
Chris Brown



PS: if you're wondering how I came to this conclusion, I disabled Inktomi
and Tomcat, and started up IIS.  Then, using Telnet, I connected to port 80
on each bound IP address.  In *all* cases, I didn't host not found: I got
a standard response from IIS:

-- 8  8  8  8 --

GET / HTTP/1.1

HTTP/1.1 404 Object Not Found
Server: Microsoft-IIS/5.0
Date: Fri, 11 Jan 2002 16:31:07 GMT
Connection: close
Content-Type: text/html
Content-Length: 111

htmlheadtitleSite Not Found/title/head
bodyNo web site is configured at this address./body/html

Connection to host lost.

-- 8  8  8  8 --

This was from all addresses, even though IIS should not have bound to them.
If I then stopped IIS, and started up Tomcat, all went ok: Tomcat only bound
to the specified address.  However, restarting IIS didn't go so well: no
sites would bind anymore, complaining that the address was already in use,
which was not the case according to telnet, my browser, and my network admin
tools.  I also tried using host names instead of IP addresses, but this
didn't change anything.



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




Different results between TC3/TC4 with HTC (DHTML behavior) files and IE

2002-01-10 Thread chris brown

Hello,

We've developed a web application that uses Dynamic HTML Behaviors (see end
of e-mail for details of what they are). These rely on .htc files on the
server, which are basically simple static text-based files containing DHTML
scripts, which are mapped to tags by CSS.  These work fine with Tomcat 3.2.x
and IE5+, but the exact same files under Tomcat 4 do nothing.

It's quite a puzzling problem, and I hope some others on the list can help
solve or at least explain what's going on.  It would seem that Tomcat is
serving up the files OK in both versions (I've done some HTTP GET requests
for the same file against TC3  TC4, both seem ok).  However, when IE
requests these same files, it only takes account of them when served by TC3,
not TC4.  Maybe it's a bug in IE, but I only get this problem when these
files are requested from TC4.  When requesting these files from Apache, IIS,
Resin, or a load of other servers, I've never had any problems.

What differences between TC3  4 could explain this problem, and how can I
get around it?

Many thanks,
Christopher Brown


Explanation of Dynamic HTML Behaviors (or why it'd be nice to be able to
continue to use them...):

They're supported by Internet Explorer, and are roughly similar in idea to
the proposed css/script bindings for Mozilla.  For those who don't know,
DHTML Behaviours have been around since IE5 and are a nice way to associate
a client-side script to HTML tags in a clean way (you define a CSS class
that refers to the behaviour file, and then associate the class to HTML
tags; when any event -- such as onclick or onmouseover -- is fired, the
behavior is checked to see if has defined a handler for that event);
behavior files are text based, and wrap script in XML elements.  They're
great for making reusable active page elements...



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




Problems using same port for several services (even with different IP / hostname)

2002-01-10 Thread chris brown

Hello,

I've got to add a small Tomcat-based webapp onto a machine which already is
already several webservers.  One is an IIS webserver, the other is a search
engine (Inktomi Enterprise Search) with it's own built-in search engine.
All must run on port 80 because that's company firewall policy, and all must
run on the same host because that's all the company's prepared to dedicate
in terms of resources...

So far, no problem with the other services.  The machine has been assigned
several unique IP addresses and different names in the DNS.  A similar setup
has been created for the Tomcat service (a unique IP address and DNS entry).
Tomcat responds on this IP address and domain name correctly when the port
is anything other than 80.  I believe that the elements Engine, Host,
and Alias (the latter is within the Host element) are all correctly
set... the problem seems to be with the Connector element:

 Connector className=org.apache.catalina.connector.http.HttpConnector
  address=x.x.x.x port=80 minProcessors=5 maxProcessors=75
  enableLookups=true redirectPort=443
  acceptCount=10 debug=0 connectionTimeout=6/

My server.xml file is pretty standard, except that the Apache Service for
mod_webapp has been removed and I've changed hostnames and ports as
appropriate.  I added the address argument as described in the Tomcat
documentation, but the results I'm getting are as if this attribute was
ignored.

When checking the logs and STDOUT/STDERR, I see that when the port is 80,
Tomcat fails to start due to an exception being thrown (the basic message is
that the port is in use.  This is not the case for the specified port: it's
as if Tomcat tried binding to a different port + ip/hostname.

None of the other services intercept each other's requests erroneously -
there doesn't seem to any conflicts with them.

Am I doing something wrong?  What should I do or check, and how can I make
all these services work together correctly?

Thanks,
Christopher Brown



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




Re: Different results between TC3/TC4 with HTC (DHTML behavior) files and IE

2002-01-10 Thread chris brown

 I think you need to define a MIME type for htc in web.xml. I don't know
what
 it's supposed to be, though.

There is no specified MIME type for HTC (I don't know why, it seems odd).
This never stopped it working with previous versions of Tomcat or any other
server.  Does TC4 refuse to serve content without an associated MIME type?
(I don't think so, as a GET request worked fine via Telnet).

Any other ideas?  Anyone know what I'm talking about and have any experience
with HTC files?! (other users of HTCs).

Thanks,
Chris



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




Re: Problems using same port for several services (even with different IP / hostname)

2002-01-10 Thread chris brown

Yes they *do* have the same port, but use different IP addresses.

In IIS, go to the Management Console for the web server, and open the
properties window for any web site.  If you look at the Web Site tab,
you'll see an IP address listbox, which is by default set to (All
Unassigned). If you look at the listbox's options, you'll see a list of all
IP addresses bound to the machine (normally, there's only one, but you can
add more if your network is set up appropriately - check out TCP/IP
properties for the machine).  Inktomi Search is a stand-alone server, with
its own in-built web server (it's NOT an ISAPI extension); it too can bind
to the same port as long as the IP address is different.  I should know -- I
distribute it !!! ;-)

I'm not trying to start a flame war or whatever, I just have a problem that
I'm trying to solve, which is why I'd like to explain the problem in more
detail, because I still need a solution.

I'm well aware of the impossibility of using the same port on the same IP
address, and do know the difference between that and domain-name-based
virtual hosting.

Thank you anyway for taking the time to reply.  But unfortunately, the
problem still remains.  Any other ideas ?

Thanks,
-Chris

- Original Message -
From: Tom Drake [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, January 10, 2002 4:40 PM
Subject: Re: Problems using same port for several services (even with
different IP / hostname)


 Contrary to your statement below, only one process may bind to the
 same port (80 in this case) at the same time.

 Your IIS and Inktomi servers do not both share port 80.

 No, they don't.

 I've never worked with Inktomi, but it's conceivable that it is
 being front-ended by IIS, (via an ISAPI connector of some sort).
 This would explain why you think that it is available through port 80.

 Tomcat may be front-ended via IIS in a similar manner. All client
 requests go to IIS, which funnels them to Tomcat via an ISAPI connector.

 Instructions for setting this up may be found here:
 http://jakarta.apache.org/tomcat/tomcat-3.3-doc/in-process-howto.html

 Tom Drake
 - Original Message -
 From: chris brown [EMAIL PROTECTED]
 To: tomcat-user [EMAIL PROTECTED]
 Sent: Thursday, January 10, 2002 6:51 AM
 Subject: Problems using same port for several services (even with
different
 IP / hostname)


 | Hello,
 |
 | I've got to add a small Tomcat-based webapp onto a machine which already
 is
 | already several webservers.  One is an IIS webserver, the other is a
 search
 | engine (Inktomi Enterprise Search) with it's own built-in search engine.
 | All must run on port 80 because that's company firewall policy, and all
 must
 | run on the same host because that's all the company's prepared to
dedicate
 | in terms of resources...
 |
 | So far, no problem with the other services.  The machine has been
assigned
 | several unique IP addresses and different names in the DNS.  A similar
 setup
 | has been created for the Tomcat service (a unique IP address and DNS
 entry).
 | Tomcat responds on this IP address and domain name correctly when the
port
 | is anything other than 80.  I believe that the elements Engine,
 Host,
 | and Alias (the latter is within the Host element) are all correctly
 | set... the problem seems to be with the Connector element:
 |
 |  Connector className=org.apache.catalina.connector.http.HttpConnector
 |   address=x.x.x.x port=80 minProcessors=5 maxProcessors=75
 |   enableLookups=true redirectPort=443
 |   acceptCount=10 debug=0 connectionTimeout=6/
 |
 | My server.xml file is pretty standard, except that the Apache Service
 for
 | mod_webapp has been removed and I've changed hostnames and ports as
 | appropriate.  I added the address argument as described in the Tomcat
 | documentation, but the results I'm getting are as if this attribute was
 | ignored.
 |
 | When checking the logs and STDOUT/STDERR, I see that when the port is
80,
 | Tomcat fails to start due to an exception being thrown (the basic
message
 is
 | that the port is in use.  This is not the case for the specified port:
 it's
 | as if Tomcat tried binding to a different port + ip/hostname.
 |
 | None of the other services intercept each other's requests erroneously -
 | there doesn't seem to any conflicts with them.
 |
 | Am I doing something wrong?  What should I do or check, and how can I
make
 | all these services work together correctly?
 |
 | Thanks,
 | Christopher Brown
 |
 |
 |
 | --
 | To unsubscribe:   mailto:[EMAIL PROTECTED]
 | For additional commands: mailto:[EMAIL PROTECTED]
 | Troubles with the list: mailto:[EMAIL PROTECTED]
 |
 |
 |


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





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




[TC4] web.xml / Using Jikes Java Compiler

2001-10-01 Thread chris brown

Hello,

I've successfully setup Jikes with Tomcat 3 in the past.  How do I set it up
with Tomcat 4?  Is it any different?

Thanks,
Chris





Ideas for future versions of Tomcat (a bit controversial maybe)?

2001-10-01 Thread chris brown

Hello,

I've been trying out JDK 1.4 quite a lot, and like it a lot!  I was
wondering, given that Tomcat is a reference implementation of the
Servlet/JSP APIs, if it would be a good idea to become a very good example
of certain new APIs as well.

I've suggested a while back that the New scalable I/O channels could be
used to boost performance.  Since then, I've seen other opportunities for
increasing effeciency, simplifying code, etc.  For example, instead of
maintaining and downloading APIs for logging, it might be better to depend
upon the newer logging APIs.  The same thing could be said of certain
example applications (such as making Struts use the java.util.regex package
instead of an external regular expression package -- but then, that's going
a bit OT as there's a list for Struts too...!).  Perhaps also the
configuration could be stored using the preferences API, but I don't see so
many benefits with a change of this type.

Obviously, this would limit the accessibility of any such future version
Tomcat to users of JDK 1.4, but I don't think that's a major problem in the
majority of deployment situations (I'm guessing here, but I suspect it's
quite likely to be true).  Nevertheless, I think it would be a good step
forward.

-Chris




Re: Ideas for future versions of Tomcat (a bit controversial maybe)?

2001-10-01 Thread chris brown

That's one of the against reasons I thought of.  Nevertheless, Tomcat 3
and 4 already exist, so that solution is already available to users of such
platforms.  Furthermore, Tomcat is not the only Servlet/JSP engine out
there, so there are still alternatives for these platforms.  I'm not
generally for jumping automatically to the latest version of software, but I
do think JDK1.4 offers a lot of benefits for server-type applications, and
may therefore be worth targetting.

In any case, such developments would probably take quite a lot of time to do
well (especially the new I/O architecture), so the stability of the final
JDK1.4 release should be well known before any such upgrade of Tomcat
becomes available.

-Chris

- Original Message -
From: Ralph Einfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 11:21 AM
Subject: AW: Ideas for future versions of Tomcat (a bit controversial
maybe)?


Technically I like that idea.

BUT expierence shows that it is not a good option
to jump to early on new JDK for tools like tomcat.

From listening to this list, I've got the feeling
that there are several people in the world that
don't have the will or the chance to upgrade to
the newest JDK. Some use operating systems that
are always a bit behind with the JDK (AIX, Mac OS,
...) some deploy to an ISP that won't upgrade that
fast).

 -Ursprüngliche Nachricht-
 Von: chris brown [mailto:[EMAIL PROTECTED]]
 Gesendet: Montag, 1. Oktober 2001 10:54
 An: [EMAIL PROTECTED]
 Betreff: Ideas for future versions of Tomcat (a bit controversial
 maybe)?


 Hello,

 I've been trying out JDK 1.4 quite a lot, and like it a lot!  I was
 wondering, given that Tomcat is a reference implementation of the
 Servlet/JSP APIs, if it would be a good idea to become a very
 good example
 of certain new APIs as well.

 I've suggested a while back that the New scalable I/O
 channels could be
 used to boost performance.  Since then, I've seen other
 opportunities for
 increasing effeciency, simplifying code, etc.  For example, instead of
 maintaining and downloading APIs for logging, it might be
 better to depend
 upon the newer logging APIs.  The same thing could be said of certain
 example applications (such as making Struts use the
 java.util.regex package
 instead of an external regular expression package -- but
 then, that's going
 a bit OT as there's a list for Struts too...!).  Perhaps also the
 configuration could be stored using the preferences API, but
 I don't see so
 many benefits with a change of this type.

 Obviously, this would limit the accessibility of any such
 future version
 Tomcat to users of JDK 1.4, but I don't think that's a major
 problem in the
 majority of deployment situations (I'm guessing here, but I
 suspect it's
 quite likely to be true).  Nevertheless, I think it would be
 a good step
 forward.

 -Chris







Re: Ideas for future versions of Tomcat (a bit controversial maybe)?

2001-10-01 Thread chris brown

Thanks.

I'm aware of the tomcat-dev list, but posted it into the user list as such a
change would have a big impact on users.  Should get a wider range of
comments and ideas this way...

-Chris

- Original Message -
From: GOMEZ Henri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 11:03 AM
Subject: RE: Ideas for future versions of Tomcat (a bit controversial
maybe)?


 Good stuff Chris.

 I forwarded to tomcat-dev, where evolutions of Tomcat
 are discussed...

 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6



 -Original Message-
 From: chris brown [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 01, 2001 10:54 AM
 To: [EMAIL PROTECTED]
 Subject: Ideas for future versions of Tomcat (a bit controversial
 maybe)?
 
 
 Hello,
 
 I've been trying out JDK 1.4 quite a lot, and like it a lot!  I was
 wondering, given that Tomcat is a reference implementation of the
 Servlet/JSP APIs, if it would be a good idea to become a very
 good example
 of certain new APIs as well.
 
 I've suggested a while back that the New scalable I/O
 channels could be
 used to boost performance.  Since then, I've seen other
 opportunities for
 increasing effeciency, simplifying code, etc.  For example, instead of
 maintaining and downloading APIs for logging, it might be
 better to depend
 upon the newer logging APIs.  The same thing could be said of certain
 example applications (such as making Struts use the
 java.util.regex package
 instead of an external regular expression package -- but then,
 that's going
 a bit OT as there's a list for Struts too...!).  Perhaps also the
 configuration could be stored using the preferences API, but I
 don't see so
 many benefits with a change of this type.
 
 Obviously, this would limit the accessibility of any such
 future version
 Tomcat to users of JDK 1.4, but I don't think that's a major
 problem in the
 majority of deployment situations (I'm guessing here, but I
 suspect it's
 quite likely to be true).  Nevertheless, I think it would be a
 good step
 forward.
 
 -Chris
 




Re: Tomcat as a service

2001-10-01 Thread chris brown

Try a different solution:
http://www.alexandriasc.com/software/JavaService/index.html

I've used it with Tomcat 3 and 4, plus many other applications.  It has a
lot of useful configuration options, and I've never seen it crash or
whatever.  You may wish to modify the supplied install tomcat 4 script, as
it needs to add -current %2 for the install line.

-Chris

- Original Message -
From: Vara Prashanth [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 01, 2001 4:31 PM
Subject: Tomcat as a service



 Hello all:

 My third posting...somebody please help!

 I am using tomcat 3.2.2 but dont have the jk_nt_service file with me. I
 tried downloading it from the apache site but it redirects me to the
tomcat
 3.2.3 binaries. Can somebody please tell me if I can use the exe from
 another version of tomcat? if not can somebody send me the exe file?

 thanks a bunch
 Prashanth


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com





getResourceAsStream() and exploring the archive

2001-10-01 Thread chris brown

The ServletContext.getResourceAsStream() method is quite useful when you
know in advance the names of resources to load.  However, I'd like to know
if there's any way to explore a WAR file (say, specify a setup subfolder
in the WAR archive, then look at its contents).  This way, any number of
files with any name can be read.  This is useful for example if each file is
some sort of extensible setup info file, providing extensible deployment
info.

Any suggestions, apart from decompressing the archive and using
classes/methods in java.io.* ?

Thanks,
Chris




Re: Won't read existing file - better way to set resource locations..?

2001-09-25 Thread chris brown

It would be nice if we could override the default settings provided within a
WAR file's web.xml via some upgraded version of the /manager webapp.

This would allow a WAR file to remain a black box, but still allow an
administrator deploying the WAR file to override certain parameters, such as
file locations (as is the case in earlier postings in this thread) that vary
from system to system.  As such, it avoids uncompressing WAR files and
meddling with settings and doing away with any signed WAR files (if there
isn't such a thing as a signed WAR file, it's a bit of a shame!).

Ideally, properties in web.xml could have an attribute such as
final=true|false to indicate whether the init-param may be overridden in
such a way.  But this probably requires updating the servlet spec...

-Chris

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 25, 2001 3:52 AM
Subject: RE: Won't read existing file




 On Mon, 24 Sep 2001, Dennis Jay Dole wrote:

  Date: Mon, 24 Sep 2001 21:31:21 -0400
  From: Dennis Jay Dole [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: Won't read existing file
 
  Yes, good points,...and yet I still have no solution.
  Any other ideas?
 

 What's wrong with ServletContext.getResourceAsStream(), or configuring an
 absolute path to the directory for your config files?  Both suggestions
 were explained in my response (quoted below).

 Craig


  -Original Message-
  From: Vel Periasamy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 24, 2001 6:28 PM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Won't read existing file
 
 
  Good points. Thanks Craig.
  -Velmurugan Periasamy.
  AEGIS.Net
  http://www.aegis.net
 
 
  -Original Message-
  From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
  Sent: Monday, September 24, 2001 6:27 PM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Won't read existing file
 
 
 
 
  On Mon, 24 Sep 2001, Vel Periasamy wrote:
 
   Date: Mon, 24 Sep 2001 17:24:50 -0400
   From: Vel Periasamy [EMAIL PROTECTED]
   Reply-To: [EMAIL PROTECTED]
   To: '[EMAIL PROTECTED]'
[EMAIL PROTECTED]
   Subject: RE: Won't read existing file
  
   Try putting the file into TOMCAT_HOME\bin directory.
  
 
  This is *not* a portable solution, because it depends on the assumption
  that the current working directory is set here.  That's not true for all
  servers (or even all versions of Tomcat).
 
   BTW, you can create a separate folder to hold the data files and the
exact
   location of this folder can be specified in a properties file. Your
  servlet
   should read the properties file to get the exact location of the data
  file.
   This will give you more flexibility if you move the application
around.
  
 
  For read-only access to things in a portable manner, you should use
  ServletContext.getResource() or ServletContext.getResourceAsStream().
  This works, for example, even when your application is run directly from
a
  WAR file and there is no such thing as a real file for that resource.
 
  For read-write access, the best thing to do is pass the path to a
  configuration directory as a servlet init parameter (or a servlet
context
  init parameter, if it is global), and use that to construct absolute
paths
  to the required files.
 
   Hope this helps.
   -Velmurugan Periasamy.
   AEGIS.Net
   http://www.aegis.net
  
 
  Craig McClanahan
 
 
  
  
   -Original Message-
   From: Dennis Jay Dole [mailto:[EMAIL PROTECTED]]
   Sent: Monday, September 24, 2001 5:24 PM
   To: [EMAIL PROTECTED]
   Subject: Won't read existing file
  
  
   Hi I have a problem...
   I have a servlet which reads opens a serialized file
   File f = new File(Database.scat);
   then I do a lot of things when f.exists(),
   but since I upgraded my web server to Tomcat (from Sun's old java
   web-server)
   it f.exists() returns false even though I know the file is placed in
   the
   right
   directory Tomcat's root directory, and named correctly.
  
   Does anyone know why this Tomcat isn't allowing my servlet to open
this
   file? Does it have somthing to do with permissions, or security
  settings?...
   If so, how do I go about giving permission to my servlet to see the
  database
   file?
  
   Please help!!
  
   Dennis Jay Dole
  
   [EMAIL PROTECTED]
  
 
 





[TC4] JDK1.4 beta 2 : sun.tools.javac.Main has been deprecated

2001-09-24 Thread chris brown

I set up Tomcat 4 final with JDK 1.4 on NT.  The following message appears
when any error is created in a JSP page (I assume it passes silently by in
other cases, as it's only a warning...).

org.apache.jasper.JasperException: Unable to compile class for JSPNote:
sun.tools.javac.Main has been deprecated.





[TC4] Confusion over JspWriter and IOException in compiled JSPs (Tomcat bug...?)

2001-09-24 Thread chris brown

Hello,

In a JSP page, I have a method a bit like this:

void myMethod(Object someParam, JspWriter out)
throws IOException
{
  ...
}

The use of out is for some quick debugging.  Anyway, this code works fine
under Tomcat 3.2.3, but porting it over to TC4 final produced the following
compilation errors :

Class org.apache.jsp.IOException not found in throws

It would seem that although I'm using standard API classes/interfaces
(JspWriter, IOException), the import statements in the generated .java
files based on the .jsp files are too vague... java.io.IOException is
getting mixed up with org.apache.jsp.IOException.

This may be in turn related to some confusion between the public JspWriter
class and some underlying implementation class with the same unqualified
name.

As it happens, I don't need to use JspWriter, as it was only for debugging.
However, this sort of ambiguity could be much more annoying for some other
applications!

Hope this helps!
Chris Brown




Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs (Tomcat bug...?)

2001-09-24 Thread chris brown

I imported java.io.* ...

But if I import explicitly java.io.IOException, it might cause unqualified
references to the Tomcat IOException class to become mixed up too !

I agree that it's good practice to import each class individually using
fully-qualified names.  However (IMHO), the Tomcat development team ought to
have imported any internal implementation classes  explicitly where there's
a risk of namespace collision with very common classes.

It would have been better still if the fully-qualified names class names
were used directly in the code for Tomcat, with no imports whatsoever --
because if both the internal Tomcat classes and other classes with the same
names are ALL imported explicitly, there's still as much potential for
confusion.

Using fully-qualified class names everywhere in application code slows down
development (more typing) and may reduce readability (ok, you know which
class is which, but lines of code won't fit easily on screen at the same
time!).

-Chris

- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 1:41 PM
Subject: Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs
(Tomcat bug...?)


 you need to import java.io.IOException probably in previous versions
 of tomcat the generated code imported this method, thus masking the fact
 that you didn't import it they now (I guess) dont do this, and so the
 compiler is looking for IOException in the package of the code, which is
 org.apache.jsp (default jsp package).

 in summary  page import=java.io.IOException  shoudl fix it.

 cheers
 dim

 On Mon, 24 Sep 2001, chris brown wrote:

  Hello,
 
  In a JSP page, I have a method a bit like this:
 
  void myMethod(Object someParam, JspWriter out)
  throws IOException
  {
...
  }
 
  The use of out is for some quick debugging.  Anyway, this code works
fine
  under Tomcat 3.2.3, but porting it over to TC4 final produced the
following
  compilation errors :
 
  Class org.apache.jsp.IOException not found in throws
 
  It would seem that although I'm using standard API classes/interfaces
  (JspWriter, IOException), the import statements in the generated
.java
  files based on the .jsp files are too vague... java.io.IOException
is
  getting mixed up with org.apache.jsp.IOException.
 
  This may be in turn related to some confusion between the public
JspWriter
  class and some underlying implementation class with the same unqualified
  name.
 
  As it happens, I don't need to use JspWriter, as it was only for
debugging.
  However, this sort of ambiguity could be much more annoying for some
other
  applications!
 
  Hope this helps!
  Chris Brown
 
 





Re: automcaticly restarting tomcat after crash?

2001-09-24 Thread chris brown

I don't have a solution to your question.

However, as tomcat opens several ports, including server management ports,
it might be interesting to allow management applications to ping tomcat on
one of these ports and relaunch the service if it doesn't respond.

I don't know how to ping tomcat in this way.  Restarting the service
should be possible in platform-dependent ways (Runtime.exec(...) ...) --
would be nice if the Java Daemons API became available... :-(

-Chris

- Original Message -
From: Hans Brattberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 24, 2001 2:57 PM
Subject: automcaticly restarting tomcat after crash?


 Hi!
 I'm using Apache and the mod_jk.dll to connect to Tomcat 3.2.3 onm
 windows 2000.
 Once every week my Tomcat, or rather my webapplication, crash.
 I run both my Apache and my Tomcat as a Service in Windows.
 Is there a way to make the Apache instance to automaticly start
 Tomcat, at startup, but also in case of a crash?
 /Hans

 Hans Brattberg
 Erudio, www.erudio.se
 Lindvallsgatan 11
 117 36 Stockholm
 070-575 31 32




Re: [TC4] Confusion over JspWriter and IOException in compiled JSPs

2001-09-24 Thread chris brown

  But if I import explicitly java.io.IOException, it might cause
unqualified
  references to the Tomcat IOException class to become mixed up too !
 I dont think there is a tomcat IOException... the compiler was looking for
 that class because it was compiling a servlet that referenced a class
 IOException - which wasn't imported

You may be right in fact, but I can't verify, as all the debugging info has
since been removed.

If the problem reappears, I'll let you know.  After looking at the code
again though, I suspect you're right.

Thanks!




[TC4] /manager servlet and Webdav example

2001-09-24 Thread chris brown

Hello,

I tried using the /webdav example servlet supplied with Tomcat 4.0.  It
worked fine in read-only mode from Windows' Web folders.  I then modified
web.xml for the webdav context to enable read-write access, and using the
already running and enabled HTML manager servlet (not the plain text
version) for tomcat, I reloaded the webdav application.

The changes I had made to the appropriate web.xml (i.e.: enabling read-write
access) weren't effective.  I had to shutdown and restart Tomcat before the
changes became effective.

What does the reload command actually do then?  Does it skip reloading
web.xml ?

Thanks,
Chris




[TC4] WebDAV example - using it in other contexts, general questions

2001-09-20 Thread chris brown

Hello,

I've tried out the WebDAV example context provided with Tomcat 4.0, and
it's very practical and straightforward to use.  I imagine it's built on top
of Jakarta Slide.  Nevertheless, I've found both WebDAV and Slide difficult
to put into practice, because:

- it could create a lot of potential security risks,

- I don't understand the mechanism by which webdav URLs map onto real
resources on the server (how does it find the context's root directory?  how
can you replace servlets within WEB-INF?  how are operating system file
permissions handled when manipulating files on the server?  etc...)

What I'd like to do is be able to put stuff on-line, do updates, etc. using
WebDAV (instead of Samba, shared network folders, etc.) ; the solution in
the webdav example context is simple, and it would be nice to integrate it
with other contexts if possible.

Hopefully someone can answer these questions and show me how to proceed!

Thanks,
-Chris




[TC4] What's the Ejb.../ element in server.xml (in Context)? Can't find doc

2001-09-14 Thread chris brown

Hello,

Had a look at server.xml as supplied with TC4 RC2, and found an Ejb
element in the example context, but can't find any documentation (looked at
comments in server.xml and read supplied documentation for server.xml
elements as it appears in the default context when you first start up
Tomcat).

It seems obviously associated with EJBs in some way from its name, but as I
can't find any documentation, and as Tomcat's not an EJB container, I'm just
wondering what it's there for and how it's supposed to work.  Can anyone
tell me the answer or where I might find the answer myself?

Thanks,
Chris




Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place

2001-09-11 Thread chris brown

 The most likely cause of this is that you have outdated entries for your
JRE
 / JDK in your Windows registry.

Thanks for the suggestion, but this is a clean install of JDK1.3.1!  Any
other ideas?

- Original Message -
From: Remy Maucherat [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 10, 2001 7:10 PM
Subject: Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for
server.xml in wrong place


  Hello,
 
  I've installed previous beta versions of Tomcat 4 as an NT service using
 the
  JavaService tool from
  http://www.alexandriasc.com/software/JavaService/index.html without
 problem.
  I tried the same thing using RC1, but Tomcat wouldn't start.  Here's the
  exception that appeared on STDOUT :
 
  Catalina.start: java.lang.Exception: Can't open config file:
  C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException:
  C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable)
  java.lang.Exception: Can't open config file:
  C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException:
  C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable)
   at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:238)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
   at java.lang.reflect.Method.invoke(Native Method)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:212)
 
  What should I change to make this work using JavaService?  Running the
 exact
  same version of Tomcat directly from the DOS prompt with the default
  startup and shutdown files works without any problems.  I haven't
  modified anything else in any other way ; the environment variables
  TOMCAT_HOME and CATALINA_HOME are correctly defined.

 The most likely cause of this is that you have outdated entries for your
JRE
 / JDK in your Windows registry.

 Remy





Re: why tomcat

2001-09-11 Thread chris brown

 Just been reading your postings.  Am I right in saying that Tomcat does
not
 support EJBs?  What about tomcat 4?

Tomcat isn't an EJB container, but it can be an EJB client.  You can't
host EJBs within Tomcat them, but if you have an EJB container somewhere
else on your network, you can access these EJBs from Java code in Tomcat in
the same way as you would from any other client application.

Why would you do this?  Well, if you buy an expensive EJB host such, you may
prefer to use it simply for its advanced J2EE capabilities, and delegate all
web-serving and presentation issues (formatting info using JSP or serlvets
for example) to another machine, running Tomcat.  It's one way to do
load-balancing.

Consider using Sun's Reference Implementation of Java Enterprise Edition ;
Tomcat is the in-built webserver and servlet/JSP engine, and can access
EJBs -- these EJBs are hosted by a different component of Sun's Reference
Edition.

-Chris




Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place - FIXED!

2001-09-11 Thread chris brown

I've fixed the problem myself.  I had to modify (only slightly) the scripts
supplied with JavaService 1.2.0, by specifying the current directory from
which to launch Tomcat 4.0.  See the modified version below (sorry for any
line breaks...).

-Chris


@echo off
echo 
echo Usage:   %0 jdk_home tomcat_home (classic/hotspot/server)
echo NOTE:You MAY NOT use spaces in the path names. If you know how
echo  to fix this, please tell me.
echo  JDK 1.3 does not come with hotpot server by default, you must
echo  install this seperately if you wish to use it.
echo Example: %0 c:\progra~1\jdk c:\progra~1\tomcat hotspot
echo 

if %1 ==  goto eof
if %2 ==  goto eof
if %3 ==  goto eof

copy JavaService.exe %2\bin\CatalinaService.exe  nul
%2\bin\CatalinaService.exe -install Catalina
%1\jre\bin\%3\jvm.dll -Djava.class.path=%2\bin\bootstrap.jar;%2\bin\servlet.
jar;%1\lib\tools.jar -Dcatalina.home=%2 -start
org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
%2\logs\stdout.log -err %2\logs\stderr.log -current %2

goto eof

:eof






Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place - FIXED!

2001-09-11 Thread chris brown

It's not a patch for Tomcat, it's an update for an example script for a
third-party tool (a very good one, not just for tomcat).

I don't think there are any portability issues really, as it's not concerned
with web applications directly, it's more to do with how the servlet engine
is launched, and that's engine-specific anyway.  When I mentioned current
working directory, it's the directory from within which tomcat is started
by the service wrapper.  I'm assuming that the service wrapper launches from
c:\winnt, and tomcat inherited this as the base directory ; unsurprising
that it couldn't find its conf directory !

Thanks for your comments all the same!
-Chris

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Tuesday, September 11, 2001 5:33 PM
Subject: Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for
server.xml in wrong place - FIXED!


 Although there is nothing wrong in principle with doing this, I
 ***strongly*** urge you to write your applications in a manner that does
 not depend on it.  Otherwise, you are locked in to Tomcat forever, because
 there is no guarantee you will be able to control the current working
 directory of any other server.

 Also, patches should be posted to the TOMCAT-DEV list to make sure that
 they get noticed.

 Craig

 On Tue, 11 Sep 2001, chris brown wrote:

  Date: Tue, 11 Sep 2001 13:09:25 +0200
  From: chris brown [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: tomcat-user [EMAIL PROTECTED]
  Subject: Re: [TC4-RC1/NT] Running as an NT service: Tomcat looks for
  server.xml in wrong place - FIXED!
 
  I've fixed the problem myself.  I had to modify (only slightly) the
scripts
  supplied with JavaService 1.2.0, by specifying the current directory
from
  which to launch Tomcat 4.0.  See the modified version below (sorry for
any
  line breaks...).
 
  -Chris
 
 
  @echo off
  echo 
  echo Usage:   %0 jdk_home tomcat_home (classic/hotspot/server)
  echo NOTE:You MAY NOT use spaces in the path names. If you know how
  echo  to fix this, please tell me.
  echo  JDK 1.3 does not come with hotpot server by default, you
must
  echo  install this seperately if you wish to use it.
  echo Example: %0 c:\progra~1\jdk c:\progra~1\tomcat hotspot
  echo 
 
  if %1 ==  goto eof
  if %2 ==  goto eof
  if %3 ==  goto eof
 
  copy JavaService.exe %2\bin\CatalinaService.exe  nul
  %2\bin\CatalinaService.exe -install Catalina
 
%1\jre\bin\%3\jvm.dll -Djava.class.path=%2\bin\bootstrap.jar;%2\bin\servlet.
  jar;%1\lib\tools.jar -Dcatalina.home=%2 -start
  org.apache.catalina.startup.Bootstrap -params start -stop
  org.apache.catalina.startup.Bootstrap -params stop -out
  %2\logs\stdout.log -err %2\logs\stderr.log -current %2
 
  goto eof
 
  :eof
 
 
 
 





[TC4-RC1/NT] Running as an NT service: Tomcat looks for server.xml in wrong place

2001-09-10 Thread chris brown

Hello,

I've installed previous beta versions of Tomcat 4 as an NT service using the
JavaService tool from
http://www.alexandriasc.com/software/JavaService/index.html without problem.
I tried the same thing using RC1, but Tomcat wouldn't start.  Here's the
exception that appeared on STDOUT :

Catalina.start: java.lang.Exception: Can't open config file:
C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException:
C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable)
java.lang.Exception: Can't open config file:
C:\WINNT\system32\conf\server.xml due to: java.io.FileNotFoundException:
C:\WINNT\system32\conf\server.xml (Le chemin spécifié est introuvable)
 at org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:238)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:725)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:212)

What should I change to make this work using JavaService?  Running the exact
same version of Tomcat directly from the DOS prompt with the default
startup and shutdown files works without any problems.  I haven't
modified anything else in any other way ; the environment variables
TOMCAT_HOME and CATALINA_HOME are correctly defined.

Thanks,
Chris Brown


Note: the installation script for JavaService is as follows (pretty much
standard):

@echo off
echo 
echo Usage:   %0 jdk_home tomcat_home (classic/hotspot/server)
echo NOTE:You MAY NOT use spaces in the path names. If you know how
echo  to fix this, please tell me.
echo  JDK 1.3 does not come with hotpot server by default, you must
echo  install this seperately if you wish to use it.
echo Example: %0 c:\progra~1\jdk c:\progra~1\tomcat hotspot
echo 

if %1 ==  goto eof
if %2 ==  goto eof
if %3 ==  goto eof

copy JavaService.exe %2\bin\TomcatService.exe  nul
%2\bin\TomcatService.exe -install Catalina
%1\jre\bin\%3\jvm.dll -Djava.class.path=%2\bin\bootstrap.jar;%2\bin\servlet.
jar;%1\lib\tools.jar -Dcatalina.home=%2 -start
org.apache.catalina.startup.Bootstrap -params start -stop
org.apache.catalina.startup.Bootstrap -params stop -out
%2\logs\stdout.log -err %2\logs\stderr.log

goto eof

:eof





Re: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released

2001-08-10 Thread chris brown

A few questions about the downloads :

1./ Windows Installer version
(I assume this is the .exe in the main download folder ; I would have
expected it in the bin subfolder...).  What does this file actually do?  I
imagine that it unzips the files and installs Tomcat as a service (using
jk_nt_service) -- am I correct so far?  Does it do anything else, such as
modify httpd.conf for Apache or any other server setup files (for IIS or
whatever)?

2./ mod_webapp
- Where's the Windows binary?!  The only version I see is for Linux (at
present).
- Is this connecter stable code?
- Is it only for Apache 2.0, or can it be used with 1.3.20, etc.?
- Is there any documentation for mod_webapp (I don't know how to use it...)?
- What's the difference between mod_webapp and mod_jk anyway?!

3./ NT service
I currently use JavaService, available from
http://www.alexandriasc.com/software/JavaService/index.html, to run Tomcat
3.2.3 as a service.  Is this still possible with Tomcat 4.0, or do I need to
use jk_nt_service ?

Thanks,
Chris B.

- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 8:01 AM
Subject: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released


 A release candidate version of Tomcat 4.0, version beta 7, has been
 released.  This version conforms to the Proposed Final Draft 3 version of
 the Servlet 2.3 and JSP 1.2 specifications, which will go final soon, and
 incorporates all of the latest bugfixes.

 In addition, for users who run Tomcat 4.0 on Windows 9x, this release
 fixes a security vulnerability that allows users to browse the directory
 tree above the web application's context root by using request URIs
 including three or more dots (/...).  Users running on Win2K and Unix
 systems are *not* susceptible to this vulneratibility.

 In addition, as with the previous version, an installer-based version of
 Tomcat 4.0-beta-7 is available for Windows users, as well as native code
 versions of the mod_webapp connector for Apache.

 Binary distributions are available at:

   http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/

 Source distributions are available at:

   http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/src/

 Craig McClanahan






Re: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released

2001-08-10 Thread chris brown

I've answered some of my own questions, but not all.

Re: 1./
I began using the installer, but didn't find that it offered me much; it
didn't let me choose my preferred JVM.  I resorted instead to the standard
ZIP file, which worked just fine.  I'd still welcome more info. about it
though!


Re: 2./ mod_webapp
I found a few answers in RELEASE-NOTES-4.0-B7.txt as supplied with the
distribution.  I still can't find any non-Linux distributions however, (I
require a Win32 binary).  I can't find any detailed documention about it
(what is a warp connection?  I've seen warp.jar in Tomcat, but I don't know
really what it does or how to use it)...

How else can I connect Tomcat 4.0 with an Apache server (1.3.20) ?


Re: 3./ NT Service
JavaService seems to work fine with Tomcat 4. There's no problem in using
it's supplied setup scripts (very easy).


Hope someone can reply to the outstanding questions.  Hope my
comments/questions are of use to others too!

-Chris


- Original Message -
From: chris brown [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 10:44 AM
Subject: Re: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released


 A few questions about the downloads :

 1./ Windows Installer version
 (I assume this is the .exe in the main download folder ; I would have
 expected it in the bin subfolder...).  What does this file actually do?
I
 imagine that it unzips the files and installs Tomcat as a service (using
 jk_nt_service) -- am I correct so far?  Does it do anything else, such as
 modify httpd.conf for Apache or any other server setup files (for IIS or
 whatever)?

 2./ mod_webapp
 - Where's the Windows binary?!  The only version I see is for Linux (at
 present).
 - Is this connecter stable code?
 - Is it only for Apache 2.0, or can it be used with 1.3.20, etc.?
 - Is there any documentation for mod_webapp (I don't know how to use
it...)?
 - What's the difference between mod_webapp and mod_jk anyway?!

 3./ NT service
 I currently use JavaService, available from
 http://www.alexandriasc.com/software/JavaService/index.html, to run Tomcat
 3.2.3 as a service.  Is this still possible with Tomcat 4.0, or do I need
to
 use jk_nt_service ?

 Thanks,
 Chris B.

 - Original Message -
 From: Craig R. McClanahan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, August 10, 2001 8:01 AM
 Subject: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released


  A release candidate version of Tomcat 4.0, version beta 7, has been
  released.  This version conforms to the Proposed Final Draft 3 version
of
  the Servlet 2.3 and JSP 1.2 specifications, which will go final soon,
and
  incorporates all of the latest bugfixes.
 
  In addition, for users who run Tomcat 4.0 on Windows 9x, this release
  fixes a security vulnerability that allows users to browse the directory
  tree above the web application's context root by using request URIs
  including three or more dots (/...).  Users running on Win2K and Unix
  systems are *not* susceptible to this vulneratibility.
 
  In addition, as with the previous version, an installer-based version of
  Tomcat 4.0-beta-7 is available for Windows users, as well as native code
  versions of the mod_webapp connector for Apache.
 
  Binary distributions are available at:
 
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/
 
  Source distributions are available at:
 
 
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b7/src/
 
  Craig McClanahan
 
 






[TC4] mod_webapp

2001-08-10 Thread chris brown

 Hey... Everyone needs to sleep sometime... I can't prepare binaries if
 I'm lying down on my bed with my eyes shut. :)

Your time *is* very much appreciated... I can wait, it's still quicker than
writing it myself !


 And anyway, there's not going to be a Win32 binary today... As I still
 don't have a Win32 C compiler...

Just wondered if was an oversight... what with sleep deprivation, and so on!
;-)  I'd happily compile it for you if I had a C compiler and knew how to
use it... ;-))


  How else can I connect Tomcat 4 with an Apache server (1.3.20)?

 Dunno Kill windows, install a decent operating system (such as Solaris
 x86, BeOS, Darwin, FreeBSD etc etc etc) to have it working today :)

We already have Linux *and* Windows.  I prefer Linux (and Unix) by a long
way, and use it where possible, but we still need Windows for a few other
applications (i.e.: no equivalents for certain applications).  For various
reasons, we also need to deploy with NT/2000 sometimes, so it's nice to know
what's portable and what's not.

I was wondering if I could still use mod_jk...  or if mod_webapp will be the
only way for Tomcat 4.  I've also heard about using a JNI interface with
Apache 2, but I don't know how viable this option is (yet).


 Pier

Just wanted to let you know that your work is appreciated, and that I'm not
a whining Windows user...!





Re: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released

2001-08-10 Thread chris brown

I've had a look at Tomcat 4's server.xml file.  Seems straightforward
enough.  Following on from your comments about still being able to use
mod_jk with Tomcat 4, can I simply copy over my Connector.. settings from
my server.xml file for Tomcat 3.2.x ?

Connector className=org.apache.tomcat.service.PoolTcpConnector
 Parameter name=handler
value=org.apache.tomcat.service.connector.Ajp13ConnectionHandler/
 Parameter name=port value=8009/
/Connector

Do I still need both an AJP12 connector (for shutdown) *and* AJP13 connector
(for main communication) ?

Thanks again,
Chris


- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: tomcat-user [EMAIL PROTECTED]
Sent: Friday, August 10, 2001 5:54 PM
Subject: Re: [ANNOUNCEMENT] Tomcat 4.0-beta-7 Released


 You can in fact use mod_jk if you want to -- on the Apache side it's
 identical to the mod_jk used for Tomcat 3.x.  Instructions for configuring
 this can be found in the jakarta-tomcat-connectors CVS repository.  I'll
 take a look at packaging things up (but mod_webapp has been my personal
 focus).

 Craig





Re: Beyond Tomcat 4..?

2001-08-02 Thread chris brown

 Experimenting with the new I/O calls is certainly something I'm
 interested in exploring (along with performance tuning in general).  But
 the reality is that what actually gets added post-4.0 is based on what
 features people suggest, combined with what features people actually write
 code for.

 Are there particular things you're interested in seeing?

 Craig McClanahan

Improved performance is always welcome.  In general though, one of the main
attractions for myself with regards to Tomcat is that it's a very good
servlet engine, but doesn't try to go much further (no EJB container for
example).  I'd hate to see Tomcat bloat up ; that's where bugs and strange
issues can become less manageable.  Things like server-side includes for the
HTTP part of Tomcat aren't really useful to me ; I prefer to let Tomcat
handle the Java side of things, and let Apache do the rest.   I don't think
Tomcat should start trying to do things are beyond the scope of being a
servlet engine (although a *basic* HTTP server is good for initial setup).

One suggestion however: when deploying WAR files, it's a bit annoying to
have to fiddle with web.xml in the uncompressed files in order to modify
servlet init-params for example.  It would be good to allow an administrator
to have some (standardised?) mechanism to deploy a WAR file as a black box
and then override certain webapp params (from some sort of admin tool or
interface?) without touching the webapp itself.

-Chris Brown

PS: I'd love to code some of these bits and pieces myself, but I don't have
the time to implement quality code that doesn't upset other components.




Re: Tomcat 4 / Apache connecter (Was: Tomcat 4.0 stability, etc.)

2001-08-01 Thread chris brown

I'd like to move over to Tomcat 4, but I'm waiting for two things to become
available:

 1. Apache webapp connecter
 2. Possibility to run Tomcat as an NT Service

As I understand it, Pier might be able to give an idea of when this
connector will be stable (shouldn't have anything to do with finalisation of
JSP spec..) ; as for the second point, I'm not sure whether there's much
difference in running Tomcat 3.x as a service compared with Tomcat 4.x.
Maybe someone could advise whether the service wrappers are final for
Tomcat 4, and indicate what differences there are (if any) between running
3.x and 4.0 as a service?

I currently use JavaService to run it [Tomcat 3.x] as a service.
http://www.alexandriasc.com/software/JavaService/index.html

Thanks to anyone who can supply any further info.
-Chris


- Original Message -
From: Pier P. Fumagalli [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 7:00 PM
Subject: Tomcat 4.0 stability (Was: Re: SAX 2.0, sealing, Tomcat 3.2.3)


 I would assert that 4.0b6 is at least as stable as 3.2.3 when running with
 the HTTP connector in stand alone mode. I'm working on the webapp
connector
 for Apache for it, and that cannot be considered qualitable as the built
in
 HTTP.

 But let's ask to the master of TC4.0... Craig?

 Pier





Beyond Tomcat 4..?

2001-08-01 Thread chris brown

Just wondering what's being planned for the future of Tomcat beyond the 4.0
release (if anyone knows...).  For example, are there plans to make a
release that uses JDK 1.4's scalable I/O features?  (as both products are
currently in beta, I imagine that could be some way off!)



- Original Message -
From: Craig R. McClanahan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 31, 2001 11:35 PM
Subject: RE: SAX 2.0, sealing, Tomcat 3.2.3


 On Tue, 31 Jul 2001, Bryan Rood wrote:

  Pier,
 
  I am interested in using a 4.0.something tomcat build.
 
  Are there official sources at apache that can confirm the VERY_stable
  declaration that you have made?
  My company won't let me use anything but a stable production release.
  Is the 4.0 the same as prod quality?
  thanks so much,
 

 I'm one of the primary authors of Tomcat 4.0, so I've got some thoughts
 about this (and undoubtedly some bias as well :-).

 The only reason that 4.0 has not been declared final yet is that the
 underlying specifications it is based on (Servlet 2.3 and JSP 1.2) are not
 yet final.  In fact, small changes and clarifications are still going on,
 and it would be pretty silly to declare 4.0 final and then have to go
 change it because the specs changed underneath.

 There will shortly be a beta 7 release, to pick up the most recent
 specification-related changes.  It should be considered a release
 candidate, and development efforts between now and release day will be
 focused on bug fixes (at the moment, there are very few bugs recorded
 against Tomcat 4 in the bug tracking system at
 http://nagoya.apache.org/bugzilla/) and improved documentation.

 Craig McClanahan



  Bryan
 
  -Original Message-
  From: Pier P. Fumagalli [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 31, 2001 9:33 AM
  To: [EMAIL PROTECTED]
  Subject: Re: SAX 2.0, sealing, Tomcat 3.2.3
 
 
  Andrew Cooke at [EMAIL PROTECTED] wrote:
  
   I don't want to use 4.0 as it's beta.
 
  Don't worry about being a beta... It's stable, _VERY_ stable.
 
  Pier
 






ServletContext.log() - where does it go?

2001-07-27 Thread chris brown

I've tried some simple logging using the following code in some servlets
running under Tomcat 3.2.3.

getServletContext().log(some message);

Normally, I would have expected this to appear in the servlet.log file,
but this file remains empty.  It's created correctly by Tomcat whenever
Tomcat starts, but seems empty.

Any ideas as to what I should do to make the messages appear?

Thanks,
Chris




Re: Replacing tools.jar with Jikes for JSP compilation

2001-07-19 Thread chris brown

You also need to provide the path to the jikes executable as an init-param
for the JspServlet, eg:

init-param
  param-namejspCompilerPath/param-name
  param-valuec:\jikes\bin\jikes.exe/param-value
/init-param

However, I've still had problems with the Jikes plug-in when using Windows,
as the startup.bat script forces jikes to use the standard CLASSPATH instead
of JIKESPATH environment variables.  This is important as with CLASSPATH,
you don't need to specify where rt.jar is (that's the archive containing
java.lang, java.util, etc.), whereas JIKESPATH contains the CLASSPATH info
plus all of the other essential classes for Jikes (as Jikes make any
assumptions about which JDK to use).

You can work around this by modifying startup.bat, but it's a shame there
isn't a -jikes parameters for the startup script with the standard
distribution.

Other than that, I've also looked at the source code (for Tomcat 3.2.2) for
the various JSP compilation classes ; Tomcat forces all compilers to use
UTF8 encoding, which provokes havoc with ISO-8859-1 or UTF16 encodings
(i.e.: you get nothing but garbage in some cases, in other cases, Tomcat
sends uncompiled source code!!!).

No one seems interested by the above points however, which is a great shame.
I've already posted about these subjects... check out the archives...

-Chris


- Original Message -
From: Gautam Sinha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 4:21 AM
Subject: Replacing tools.jar with Jikes for JSP compilation


 This seems to be a popular question.  There have been some excellent
 postings before to solve the dilemma, and some of them involved modifying
 the tomcat source code.

 Here are the steps for replacing tools.jar with Jikes for Tomcat 3.2.1 on
 the Windows 2000 platform, without modifying the source code for Tomcat.

 1. Download jikes.  It is currently available from
 http://oss.software.ibm.com/developerworks/opensource/jikes/ under the IBM
 Open License.
 2. Add the path to the jikes.exe executable to the system PATH variable.
 3. Assuming you already have the JRE (Java Runtime Environment) available,
 add rt.jar to the Java classpath variable (usually found in
 JAVA_HOME/jre/lib).
 4. Paste the following code anywhere between the web-app and /web-app
 tags of the web.xml file contained in the WEB-INF directory of your web
 application (not the web.xml in tomcat_home/conf).  If you don't have a
 web.xml for your application, you can create one by putting the following
 code between web-app and /web-app tags and placing it in the WEB-INF
 directory of your application context.

   !-- Using jikes java compiler for JSP --
 servlet
   servlet-name
   jsp
   /servlet-name

   servlet-class
   org.apache.jasper.servlet.JspServlet
   /servlet-class

   init-param
   param-namejspCompilerPlugin/param-name

 param-valueorg.apache.jasper.compiler.JikesJavaCompiler/param-value
   /init-param

   load-on-startup
   -2147483646
   /load-on-startup
 /servlet

   !-- Mapping jsp pages to the jsp servlet --
 servlet-mapping
   servlet-name
   jsp
   /servlet-name
   url-pattern
   *.jsp
   /url-pattern
 /servlet-mapping

 (It is important to clean out precompiled JSP files in Tomcat's work
 directory and to search throughout the local hard drives for copies of
 tools.jar and temporarily rename them before you can establish that jikes
is
 indeed being used to compile the JSP).

 Troubleshooting:

 1. It is safe to ignore the message(s) of the following format:  Ctx():
 Removing duplicate servlet jsp
 jsp(org.apache.jasper.servlet.JspServlet/null)
 2. If you get a message like Location: /myapp/edituser.jsp -- Internal
 Servlet Error: -- org.apache.jasper.JasperException: Unable to compile
class
 for JSP at org.apache.jasper.compiler.Compiler.compile(Compiler.java:254)
 followed by a stack trace, most likely the system did not find jikes.exe
 in its search path.
 3. If you get a message like Location: /myapp/edituser.jsp -- Internal
 Servlet Error: -- org.apache.jasper.JasperException: Unable to compile
class
 for JSP -- Found 2 system errors: -- *** Error: Could not find package
 java/util in: followed by a list of paths, most likely the system did
not
 find rt.jar in its classpath.  java/util and java/lang are read from
 rt.jar.


 Good luck!






Re: How can I logoff

2001-07-19 Thread chris brown

Try session.invalidate() then send the HTTP status code 401 Unauthorized

session.invalidate();
response.sendError(response.SC_UNAUTHORIZED, Logged out);

Might get you going in the right direction.

-Chris

- Original Message -
From: Blue, Neil [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 19, 2001 11:15 AM
Subject: RE: How can I logoff


 Thank you Kaneda,

 It doesn't seem to work.

 Cheers
 Neil

 -Original Message-
 From: Kaneda K [mailto:[EMAIL PROTECTED]]
 Sent: 19 July 2001 09:42
 To: [EMAIL PROTECTED]
 Subject: Re: How can I logoff


 At 15:57 18/07/2001 +0100, you wrote:
 Hello,
 
 I am using the JDBC sercurity on tomcat 3.3. I am able to logon (via
basic
 authentication) to view a secured .jsp page. however I can not see how a
 user can logoff again so that a new user can logon. Please could someone
 point me in the right direction.
 
 Cheers
 Neil


 The fonction to log of is %session.invalidate();% but I am not sure
 that It works with basic authentification.
 In fact, I think is does not works. but check any way




JkMount for servlets - regexp syntax?

2001-07-18 Thread chris brown

I've no problem using the JkMount directive of mod_jk within Apache's
httpd.conf

However, with a large number of servlets, it becomes tedious to maintain a
long list of JkMount directives for each individual servlet.  On the other
hand, I don't want to use a simple wildcard (*) to pass all requests to
mod_jk/tomcat, as -- although simpler -- this would stop Apache serving up
static content.

# Too generic:
JkMount /myContext/* ajp13

# Too tedious with a lot of servlets (especially with long context name)
JkMount /myContext/*.jsp ajp13
JkMount /myContext/ServletA ajp13
JkMount /myContext/ServletB ajp13
JkMount /myContext/ServletC ajp13
# etc. ...

# Not suitable given current site set-up
JkMount /servlet/* ajp13

# I'm looking for a syntax (regexp?) such as:
JkMount /myContext/(ServletA|ServletB|ServletC)\?.* ajp13

# I tried the following workaround, but JkMount was disallowed here
LocationMatch /myContext/(ServletA|ServletB|ServletC).*
  JkMount * ajp13
/LocationMatch

Any workarounds for simplifying pattern-matching for servlet URLs ?

Thanks
Chris Brown





Tomcat 3.2.2: wrong charset (always UTF8) when creating .java from .jsp

2001-06-22 Thread chris brown

I have two instances of Tomcat 3.2.2, one running under Windows NT, the
other running under Linux.  The problem is identical in the two.

No matter what character set I use when saving my JSP files to disk, Tomcat
always assumes that they're in UTF8 format.  When I activate DEBUG logging
for jasper.log, the following entry always appears when compiling a class:

Compiling with: -encoding UTF8 ...

(the ... refers to other command-line parameters, such as -classpath).

This has some unfortunate side effects:

1./
If I save my file as UTF-16, no JSP tags are recognised are the resulting
file is supplied as-is to the browser.  I've looked at the .java file
that Tomcat creates, and it creates lines such as :

out.write(ÿþ % @   p a g e   l a n g u a g e = \ j a v a \   %   \r\n
 % !  \r\n s t a t i c   i n t   h i t s   =   0 ;  \r\n %   \r\n  h t m
l   \r\n  h e a d   \r\n  t i t l e  J S P   E x a m p l e  / t i t l
e   \r\n  / h e a d   \r\n  b o d y   \r\n  \r\n  h 1  J S P   E x a
m p l e  / h 1   \r\n  \r\n  p  H i t   c o u n t :% =   + + h i t
s   %Ãé   x  / p   \r\n  \r\n  / b o d y   \r\n  / h t m l 
);

2./
All accented characters are shown up as é or similar (instead of é).
This has nothing to do with the %@page contentType % directive, as that's
handled correctly.  It's the creation of the .java file which goes wrong.

Is this a known bug?  Any workarounds?  Never seemed to have this problem
running the same code under Tomcat 3.2.1...

-Chris




Problems using Jikes as compiler

2001-06-22 Thread chris brown

I've successfully specified Jikes as the Java compiler for the jsp servlet
under Tomcat 3.2.2 with Windows NT.  However, I can't get Tomcat to use
JIKESPATH instead of CLASSPATH when compiling, as the JspCompilerPlugin
supplied with Tomcat passes the -classpath param to Jikes, consequently
overriding JIKESPATH.  As a result, Jikes no longer finds rt.jar, so it
can't compile anything (as it can't find java.lang.* ..!).

I've correctly setup the environment variables for normal use.  So at
MS-DOS, I can type:
C:\classes jikes Hello.java

However, if I type:
C:\classes jikes -classpath . Hello.java

... it doesn't work, as JIKESPATH is overridden.  Looking at jasper.log, I
see that Tomcat takes the second option, so JIKESPATH isn't taken into
account.  How can I get around this?

Thanks,
-Chris








Re: Jikes and Tomcat for JSP compilation

2001-06-07 Thread chris brown

Hi Peter (and anyone else following this thread),

If it's any consolation, I've asked the same question on many mailing lists
over a long period of time, and nobody's given a working answer yet.

I have a JDK installed (hence I've got javac), plus Jikes.  When using
Jikes from the commandline, it works fine.  I've even uncommented the line
in web.xml.  But I never seemed to get it working, as in the pages still
compiled, but there was no way of knowing if it was jikes or javac that did
it  I tried renaming Jikes.exe to _jikes._exe to see if Tomcat missed
it, but it didn't complain, so I just assumed it hadn't been taken into
account anyway.

I suspected that I needed to copy all (or part) of the default web.xml into
each web-app's WEB-INF folder, uncommenting the jikes line as appropriate.
However, this didn't work at all well, as it seemed to give Tomcat a
headache.  I've already posted on this (overriding default web.xml with
custom web.xml).  Not a lot of luck there either...

Hope someone can give a clear answer as to how to do this -- and verify that
it works!

-Chris Brown

- Original Message -
From: WEST, Peter
To: [EMAIL PROTECTED]
Sent: Wednesday, June 06, 2001 8:19 PM
Subject: Jikes and Tomcat for JSP compilation



 can anybody point me to a straightforward how to get Tomcat to compile
JSPs
 with Jikes rather than JDK tutorial?

 So far I have changed web.xml server.xml (both of which made no
difference).
 I have also read that it may be necessary to change the source of a line
in
 webserver.jar I have the details of this but dont exactly believe it is
 necessary??

 Any pointers? Ideas?

 thanks,

 Pete





Re: tomcat + linux + graphics

2001-05-04 Thread chris brown

According to the current specs for JDK1.4, this issue should become a thing
of the past (see 'Headless' Java proposal).  But then, JDK1.4 isn't
available yet... so you'll need to wait a bit for that solution...

-Chris

- Original Message -
From: Benoit Jacquemont [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 04, 2001 11:26 AM
Subject: Re: tomcat + linux + graphics


 Hi,

 I had the same problem some time ago. I need to generate graphics with AWT
 and due to problem with JVM, I needed to install a X server.
 The first solution that came to my mind was to start an xterm after
launching
 the X server in the rc.local with a -e option to launch a script running
 tomcat.

 So I had a X server that consume memory and CPU on a Web server that do
not
 need any graphics interface...

 Then I found a library that replace some AWT classes and allow you to
 generate graphics without any X server running !!
 The package is a GNU one, it's called PJA and you can download it from the
 following website:
 http://www.eteks.com

 So, I installed this package (no need to recompile, just some add to the
java
 command line of tomcat), removed the X server from my web server, and save
 disk space, save CPU ressource and freed a lot of memory !!


 So, my advice is you should try it, and forget about Java limitation of
the
 JVM !

 Benoît


  i'm having big problems with graphics dynamically created with tomcat on
  linux. on windows, the servlet works fine, on linux i have to start
tomcat
  going to the server, starting X and then starting tomcat. i want to do
this
  automatically and i want to connect tomcat to X windows without going to
  the server. did anybody solve this problem? it would help to get a
working
  startup script for tomcat including the connection to a running X.
 
  thanks,
  michael