RE: [HOW TO] - GLOBAL VARIABLES - PLEASE HELP

2002-10-18 Thread Mathew Pole
Hi Donie,

The second half of this is you need to know how to access it:

try {
  Context initCtx = new InitialContext();
  String foo = (String)(context.lookup (java:comp/env/foo));
}
catch (NamingException exc) {
  // oops
}

Regards,
   Mathew

--
Mathew Pole 
Web Architect, Gerard Industries
email: [EMAIL PROTECTED] mailto:mathew.pole;clipsal.com.au 
www: http://www.clipsal.com http://www.clipsal.com  
http://www.custompress.com.au http://www.custompress.com.au 
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617

 Hi Donie,
 
 You can define a variable in the global web.xml (in conf directory). 
 This variable should be available to all your applications. 
 This should 
 come at the end of the $TOMCAT_HOME/conf/web.xml file.
 
 Though I have not used and tested this (I use for a single 
 application 
 in application specific web.xml) I feel it should work.
 
 env-entry
 descriptionsome description/description
 env-entry-namefoo/env-entry-name
 env-entry-valuebar/env-entry-value
 env-entry-typejava.lang.String/env-entry-type
 /env-entry
 
 Raj

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




RE: Internal Server Error when changing class file

2002-09-12 Thread Mathew Pole

Hi ,

Recently I stopped the MyHttpServlet class implementing the
javax.servlet.SingleThreadModel, and servlets appear to reload okay now when
changing the class file.

Hopefully this helps someone.

Regards,
   Mathew

--
Mathew Pole 
Web Architect, Gerard Industries
email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
www: http://www.clipsal.com, http://www.clipsalmoeller.com.au,
http://www.aes-pl.com, www.tungali.com
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617



-Original Message-
From: Mathew Pole 
Sent: Wednesday, 4 September 2002 5:01 PM
To: [EMAIL PROTECTED]
Subject: Internal Server Error when changing class file


Hi ,
 
During development I have defined the following context to enable reloading
of servlets when I change code:
!-- Clipsal Context --
Context path=/clipsal docBase=clipsal debug=0
 reloadable=true crossContext=true
/Context

Unfortunately every change to code generates a HTTP Status 500 - Internal
Server Error, with the following stack trace:
java.lang.NullPointerException
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:678)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
 at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
 at java.lang.Thread.run(Thread.java:536)

I'm running Apache Tomcat/4.1.10-LE-jdk14 on Windows 2000. On startup the
error ServerLifecycleLIstener: createMBeans: MBeanException is reported,
but I'm under the impression that this is not important.
 
Does anyone have suggestions on how to fix this (if it is possible)?
 
Thanks,
Mathew
--
Mathew Pole 
Web Architect, Gerard Industries
email:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
www:  http://www.clipsal.com/ http://www.clipsal.com 
http://www.custompress.com.au/ http://www.custompress.com.au
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617
 

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




Servlet multithreading design question

2002-09-09 Thread Mathew Pole

If I create classes similar to the following, then I suspect that I will run
into multithreading issues, because OneServlet and TwoServlet will run in
the same JVM? Is this correct?
 
public abstract class BaseServlet extends HttpServlet
  implements SingleThreadModel
{
int value;
}
 
public class OneServlet extends BaseServlet {
  public void init (ServletConfig config) {
value = 1;
  }
}
 
 
public class TwoServlet extends BaseServlet { 
  public void init (ServletConfig config) {
value = 2;
  }
} 

--
Mathew Pole 
Web Architect, Gerard Industries
email:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
www:  http://www.clipsal.com/ http://www.clipsal.com 
http://www.custompress.com.au/ http://www.custompress.com.au
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617

 



Internal Server Error when changing class file

2002-09-04 Thread Mathew Pole

Hi ,
 
During development I have defined the following context to enable reloading
of servlets when I change code:
!-- Clipsal Context --
Context path=/clipsal docBase=clipsal debug=0
 reloadable=true crossContext=true
/Context

Unfortunately every change to code generates a HTTP Status 500 - Internal
Server Error, with the following stack trace:
java.lang.NullPointerException
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:678)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2397)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
 at org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
 at java.lang.Thread.run(Thread.java:536)

I'm running Apache Tomcat/4.1.10-LE-jdk14 on Windows 2000. On startup the
error ServerLifecycleLIstener: createMBeans: MBeanException is reported,
but I'm under the impression that this is not important.
 
Does anyone have suggestions on how to fix this (if it is possible)?
 
Thanks,
Mathew
--
Mathew Pole 
Web Architect, Gerard Industries
email:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
www:  http://www.clipsal.com/ http://www.clipsal.com 
http://www.custompress.com.au/ http://www.custompress.com.au
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617
 



RE: Adding HTTPS to Tomcat/Apache/mod_jk install on NT

2002-09-02 Thread Mathew Pole

For those people who want binaries of Apache with SSL for win32, the urls:
- http://www.gknw.de/development/apache/ 
- http://www.pcp-computer.de/gkn/apache/httpd-2.0/win32/ (mirror?)
provide pre-compiled binaries. Make sure you get version 2.0.40, 
because 2.0.39 has a nasty bug with serving pdfs.

--
Mathew Pole 
Web Architect, Gerard Industries
email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617



-Original Message-
From: Kenny G. Dubuisson, Jr. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 22 August 2002 11:19 PM
To: [EMAIL PROTECTED]
Subject: Adding HTTPS to Tomcat/Apache/mod_jk install on NT


Hello again all listers.  I was wondering if anyone could point me in the
right direction on setting up HTTPS on my Apache 2.0.40 / Tomcat 4.0.4 /
mod_jk installation on WinNT 4?  Any help would be greatly appreciated.
Thanks,
Kenny

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




BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on linux

2002-08-20 Thread Mathew Pole



Hi ,

At first glance the following combination sounded like 
a great idea (especially as I had success with this on windows 
2000):

  tomcat 4.0.4
  tomcat connectors 4.0.4
  apache 2.0.39
  linux (gentoo 1.2 distribution)
In reality it has proved very challenging. I've tried 
the following:

Following instructions provided by John Turner in http://www.johnturner.com/howto/apache-tomcat-howto.html, I 
came across a couple of issues which I resolved by 

  failed trying to build the mod_jk.so, but after 
  setting apache13.home to a bogus location and running ant native it appears to 
  have worked
  copied jk/build/lib/mod_jk.so 
  apache2/modules
  copied jk/build/lib/*.jar to 
  tomcat/common
  updated apache.conf file as 
  suggested
  updated server.xml as suggested, with addition of 
  modJk="/usr/local/apache2/modules/mod_jk.so" in the listener 
  definition
Currently, in the tomcat/logs/catalina.out file the 
following text is appearing (note the string after In : : [ changes, but 4/843 
remains constant):

BAD packet 256
 In: : [B@3e58d4 4/843

followed by what appears to be some hex output of 
mainly 00s.

My suspicion is that this error is caused by one 
of:

  mod_jk.so being compiled 
  incorrectly
  connector jar files being compiled incorrectly or 
  being in the wrong place
  incorrect configuration
I've also attached logs  configuration files to 
this email. Hopefully this is enough information for someone to help 
me.

In addition to this I looked at the instructions in http://wass.homelinux.net/howtos/Jakarta_How-To.shtml, 
but the mod-jk-303-ap20.so doesn't work with apache 2.0.39.



Regards,
 Mathew
--Mathew Pole Web Architect, Gerard Industriesemail: 
[EMAIL PROTECTED]phone: 08 8269 0511 ext 313, fax: 08 8340 1212, 
mobile: 0403 164 617



workers.properties
Description: Binary data

2002-08-20 16:47:39 HttpConnector Opening server socket on all host IP addresses
2002-08-20 16:47:46 HttpConnector[8080] Starting background thread
2002-08-20 16:47:46 HttpProcessor[8080][0] Starting background thread
2002-08-20 16:47:46 HttpProcessor[8080][1] Starting background thread
2002-08-20 16:47:46 HttpProcessor[8080][2] Starting background thread
2002-08-20 16:47:46 HttpProcessor[8080][3] Starting background thread
2002-08-20 16:47:46 HttpProcessor[8080][4] Starting background thread
2002-08-20 16:47:46 Ajp13Connector[8009] Opening server socket on all host IP addresses
2002-08-20 16:47:46 Ajp13Connector[8009] Starting background thread
2002-08-20 16:47:47 Ajp13Processor[8009][0] Starting background thread
2002-08-20 16:47:47 Ajp13Processor[8009][1] Starting background thread
2002-08-20 16:47:47 Ajp13Processor[8009][2] Starting background thread
2002-08-20 16:47:47 Ajp13Processor[8009][3] Starting background thread
2002-08-20 16:47:47 Ajp13Processor[8009][4] Starting background thread
2002-08-20 16:48:54 Ajp13Processor[8009][4] [Ajp13] incomplete read, waited #-1 got 
only 0


2002-08-20 16:47:43 WebappLoader[/examples]: Deploying class repositories to work 
directory /opt/jakarta/tomcat/work/Standalone/mpole2/examples
2002-08-20 16:47:43 WebappLoader[/examples]: Reloading checks are enabled for this 
Context
2002-08-20 16:47:43 StandardManager[/examples]: Seeding random number generator class 
java.security.SecureRandom
2002-08-20 16:47:43 StandardManager[/examples]: Seeding of random number generator has 
been completed
2002-08-20 16:47:44 ContextConfig[/examples]: Added certificates - request attribute 
Valve
2002-08-20 16:47:44 ContextConfig[/examples]: Configured an authenticator for method 
FORM
2002-08-20 16:47:44 ContextListener: contextInitialized()
2002-08-20 16:47:44 SessionListener: contextInitialized()
2002-08-20 16:47:44 ContextListener: 
attributeReplaced('org.apache.catalina.WELCOME_FILES', '[Ljava.lang.String;@ca470')
2002-08-20 16:47:44 StandardWrapper[/examples:default]: Loading container servlet 
default
2002-08-20 16:47:44 default: init
2002-08-20 16:47:44 StandardWrapper[/examples:invoker]: Loading container servlet 
invoker
2002-08-20 16:47:44 invoker: init
2002-08-20 16:47:44 jsp: init


2002-08-20 16:47:40 WebappLoader[/manager]: Deploying class repositories to work 
directory /opt/jakarta/tomcat/work/Standalone/mpole2/manager
2002-08-20 16:47:40 StandardManager[/manager]: Seeding random number generator class 
java.security.SecureRandom
2002-08-20 16:47:40 StandardManager[/manager]: Seeding of random number generator has 
been completed
2002-08-20 16:47:41 ContextConfig[/manager]: Added certificates - request attribute 
Valve
2002-08-20 16:47:42 ContextConfig[/manager]: Configured an authenticator for method 
BASIC
2002-08-20 16:47:42 StandardWrapper[/manager:default]: Loading container servlet 
default
2002-08-20 16:47:42 default: init
2002-08-20 16:47:42 StandardWrapper[/manager:invoker]: Loading container servlet 
invoker
2002-08-20 16:47:42 invoker: init
2002-08-20 16:47:42 jsp: init
2002-08-20 16:47:44 StandardHost[mpole2]: Installing web a

RE: Can't get tomcat4 + mod_jk + apache to work

2002-08-20 Thread Mathew Pole

The /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf is automatically
generated by tomcat (see http://www.johnturner.com/howto/mod_jk_conf.html
for an example)

--
Mathew Pole 
Web Architect, Gerard Industries
email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617



-Original Message-
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 August 2002 3:59 PM
To: Tomcat Users List
Subject: Re: Can't get tomcat4 + mod_jk + apache to work


On Tue, 20 Aug 2002, Scott Adamson wrote:

 I have been trying for the last week to get Apache + mod_jk + Tomcat 4 to
 work.
 I have confirmed that Tomcat works on 8080, confirmed that Apache is
 running.

[ ... ]
 Added the following to httpd.conf (see attached)
 Include /usr/local/jakarta-tomcat-4.0.4/conf/auto/mod_jk.conf
[ ... ]

What's in this file?

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
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: BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on linux

2002-08-20 Thread Mathew Pole

Hi ,

I tried this and found that ...

When I ran ./buildconf.sh, it reported the following error:
configure.in:24: AC_PROG_CPP was called before AC_PROG_CC

I ignored this and ran ./configure which appeared to work okay.

Unfortunately, the make command failed with (suspect this is caused by
./buildconf.sh failing):

Makefile:20: /usr/local/apache2/build/config_vars.mk: No such file or
directory
make[1]: *** No rule to make target
'/usr/local/apache2/build/config_vars.mk'.
Stop.
Make[1]: Leaving directory
'/home/mpole/download/jakarta-tomcat-connectors-4.0.4-src/jk/native/apache-2
.0'
make: *** [all-recursive] Error 1

Anyone have a suggestion (or at this point I will settle for a nice prebuilt
mod_jk.so for apache 2.0.39)?

Thanks,
   Mathew


-Original Message-
From: Sullivan, Mark E [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 August 2002 11:02 PM
To: 'Tomcat Users List'
Subject: RE: BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on
linux


Sorry, my mistake. I misread your email. Now that i think about it some
more, i didn't use ant to build the connector. These are the steps i
followed

cd /home/mark/jakarta-tomcat-connectors-4.1.9-src/jk/native

./buildconf.sh
./configure --with-apxs=/usr/local/apache2/bin/apxs
make 
make install

The --with-apxs command ensures that the module is built for the correct
version of apache, using that version's own apxs script. Assuming no errors
occur, the jk module should have been put into your apache/modules
directory.



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




RE: BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on linux

2002-08-20 Thread Mathew Pole

Hi Niket,

I found the following page provided enough info for me:
http://www.acg-gmbh.de/mod_jk/

Regards,
   Mathew

--
Mathew Pole 
Web Architect, Gerard Industries
email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] 
phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617



-Original Message-
From: Niket Anand [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 August 2002 5:35 PM
To: Tomcat Users List
Subject: Re: BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on
linux


Hi Mathew,
Can I get same type of instructions for
Apache2.0.4,JBoss-2.4.6_Tomcat-4.0.3,jakarta-tomcat-connectors-4.0.4-src,
JDK1.3.1 on Win2000?

Thanks,
Niket
  - Original Message - 
  From: Mathew Pole 
  To: '[EMAIL PROTECTED]' 
  Sent: Tuesday, August 20, 2002 12:57 PM
  Subject: BAD packet - Apache 2.0.39 + mod_jk (or mod_webapp) on linux


  Hi ,

  At first glance the following combination sounded like a great idea
(especially as I had success with this on windows 2000):
a.. tomcat 4.0.4 
b.. tomcat connectors 4.0.4 
c.. apache 2.0.39 
d.. linux (gentoo 1.2 distribution)
  In reality it has proved very challenging. I've tried the following:

  Following instructions provided by John Turner in
http://www.johnturner.com/howto/apache-tomcat-howto.html, I came across a
couple of issues which I resolved by 
a.. failed trying to build the mod_jk.so, but after setting
apache13.home to a bogus location and running ant native it appears to have
worked 
b.. copied jk/build/lib/mod_jk.so apache2/modules 
c.. copied jk/build/lib/*.jar to tomcat/common 
d.. updated apache.conf file as suggested 
e.. updated server.xml as suggested, with addition of
modJk=/usr/local/apache2/modules/mod_jk.so in the listener definition
  Currently, in the tomcat/logs/catalina.out file the following text is
appearing (note the string after In : : [ changes, but 4/843 remains
constant):

 BAD packet 256
 In: : [B@3e58d4 4/843

  followed by what appears to be some hex output of mainly 00s.

  My suspicion is that this error is caused by one of:
a.. mod_jk.so being compiled incorrectly 
b.. connector jar files being compiled incorrectly or being in the wrong
place 
c.. incorrect configuration
  I've also attached logs  configuration files to this email. Hopefully
this is enough information for someone to help me.

  In addition to this I looked at the instructions in
http://wass.homelinux.net/howtos/Jakarta_How-To.shtml, but the
mod-jk-303-ap20.so doesn't work with apache 2.0.39.



  Regards,
 Mathew
  --
  Mathew Pole 
  Web Architect, Gerard Industries
  email: [EMAIL PROTECTED]
  phone: 08 8269 0511 ext 313, fax: 08 8340 1212, mobile: 0403 164 617




--


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