Which is best practice for stowing objects, request or session context?

2005-06-04 Thread Adrian Beech
Hi all,

A work colleague mentioned on Friday it would be better to place objects
(beans and the like) which had been created in a servlet into the request
context when exposing them to the JSP.  To date all the code I've written
stores beans and the like in the session context and all has appeared to be
fine thus far.  I understand the nature of the various contexts and how they
relate to the process life cycle, etc.

Can someone please shed some light on this and possibly explain the merits
of placing the objects in either context?  For example, what are the
pitfalls of using the request context?  Is there any material around which
adequately details when or when not to use the specific contexts?

Cheers.
AB


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



Re: Workers, workers, how do they work??

2005-03-10 Thread Adrian Robert
On Mar 10, 2005, at 2:29 PM, Klaus-F. Kaal wrote:
I am not really sure that I understand the workers right.
I interface Apache 2.0.48 with Tomcat 5.0.28 via mod_jk.
It looks like you're trying to use a mod_jk2 config file format with 
mod_jk.  You want a file (better called workers.properties) w/the 
following:

workers.tomcat_home= [insert CATALINA_BASE here]
workers.java_home= [insert JAVAHOME here]
ps=/
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1
(You can tweak the load balancing lines.)
Also, make sure the JkWorkersFile in httpd.conf occurs outside of any 
VirtualHost section.

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


Re: Working fine on Tomcat 5.0 but not on 5.5.7

2005-03-07 Thread Adrian Robert
On Mar 7, 2005, at 10:21 AM, micky none wrote:
Hi Friends,
I have this simple method which works fine on my system(Tomcat 5.0,jdk 
1.5)..but not on the server(Tomcat 5.5.7,jdk1.5).Can someone explain 
me why:
See the thread just before this on JDK1.5 -- Java 1.5 is supported in 
servlets but not JSP due to a limitation in the JSP compiler.

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


Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-03 Thread Adrian Robert
Understandable.  I was a little dismayed to see that what had been more
automatic in Tomcat-5.0.xx had become less so in Tomcat-5.5.  What I 
mean is,
in Tomcat-5.0.xx, one could add a Logger to the context 
configuration file,
deploy that with the webapp, and dynamically get a log file for
ServletContext.log() output.  In Tomcat-5.5, one has to have this in 
the logger
config file at Tomcat startup, therefore forcing one to predict the 
apps that
will be deployed to the appserver during runtime
...
 I was trying to achieve this with multiple
separate log4j.properties, one in the container (common/classes/) for
the uncaught stack trace and other general logging, and others in each
webapp.  With my setup below I was expecting to get THREE files:
catalina.out (with stdout/err), tomcat.log (with the container's log4j
output), and bar.log (with the webapp's log4j output, which I changed
from ServletContext.log() to use Logger.info()).  Instead, I got only
catalina.out and tomcat.log, the latter containing everything that I
thought the webapp would be sending to bar.log.
And this should have worked.  It works in every case I have ever 
tried.  I
suggest you double and triple check that you have log4j.jar in both 
common/lib
and WEB-INF/lib and make sure you have log4j.properties in both 
common/classes
and WEB-INF/classes.
OK, thanks to your vote of confidence in the method, I dug further and 
discovered that my WEB-INF/classes/log4j.properties was never being 
found.  If I put the log4j.properties into the same jar (in 
WEB-INF/lib) with the class that was instantiating the Logger, it 
worked correctly.

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


Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-03 Thread Adrian Robert
OK, thanks to your vote of confidence in the method, I dug further and
discovered that my WEB-INF/classes/log4j.properties was never being
found.  If I put the log4j.properties into the same jar (in
WEB-INF/lib) with the class that was instantiating the Logger, it
worked correctly.
That's extremely odd.  What version of Tomcat are you running?  That's 
a bug
because WEB-INF/classes should be put in the classpath before jars in
WEB-INF/lib.
This is 5.5.7, with the 1.4 compatibility package on MacOS.  I've 
experienced similar issues before with different tomcat versions, 
though I had forgotten that in this case..

Note I do NOT unpack the app from a war, just copy the full hierarchy 
straight under webapps.  Also, the WEB-INF/classes/log4j.properties 
file was a symblic link.  Maybe one of these makes a difference?

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


Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-03 Thread Adrian Robert
OK, thanks to your vote of confidence in the method, I dug further 
and
discovered that my WEB-INF/classes/log4j.properties was never being
found.  If I put the log4j.properties into the same jar (in
WEB-INF/lib) with the class that was instantiating the Logger, it
worked correctly.

That's extremely odd.  What version of Tomcat are you running?  
That's a bug
because WEB-INF/classes should be put in the classpath before jars in
WEB-INF/lib.
This is 5.5.7, with the 1.4 compatibility package on MacOS.  I've 
experienced similar issues before with different tomcat versions, 
though I had forgotten that in this case..

Note I do NOT unpack the app from a war, just copy the full hierarchy 
straight under webapps.  Also, the WEB-INF/classes/log4j.properties 
file was a symblic link.  Maybe one of these makes a difference?
It turns out it WAS the symbolic link.  I get the following results:
- symbolic link, relative (e.g., WEB-INF/classes/log4j.properties - 
resources/log4j.properties): not found

- symbolic link, absolute (e.g., WEB-INF/classes/log4j.properties - 
/usr/java/tomcat/webapps/foo/WEB-INF/classes/resources/log4j.properties 
- OR - regular file: found and prevents common/classes/log4j.properties 
from being found (tomcat-general stuff goes into webapp's log file)

- file in jar with class that instantiates Logger: both tomcat's 
(common/classes/) and webapp's log4j.properties are found and heeded

Sorry about the bother if this is just standard knowledge of how tomcat 
operates on Unix.

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


Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-02 Thread Adrian Robert
On Mar 1, 2005, at 6:45 PM, Remy Maucherat wrote:
On Tue, 01 Mar 2005 18:18:49 -0500, Adrian Robert
[EMAIL PROTECTED] wrote:
However, I can't seem to find the right combination of 
log4j.properties
lines, or maybe I'm trying something impossible.  (I can't find good
docs on the uses of log4j.properties when used inside the hierarchical
classloading context that tomcat provides.)  What keeps happening is
that the webapp's log statements keep going into the global tomcat 
log.
  Would I be better off with JDK logging instead?
I am working at the moment on a small package (which will be an
implementation of java.util.logging) which will allow you doing that
using the JDK logging. The main issue with it as supplied in the JDK
is that there is only one global configuration per JVM. The trick is
to make that per classloader, with delegation, so that webapps are
isolated. At the moment, I think log4j is your only choice
(unfortunately, I'm no expert, so I can't give you tricks with this
particular configuration).
In the same package, I will also provide a handler with daily rotation.
It should be done by the end of the week (it doesn't work at the
moment, I'm busy debugging ;) ).
Great news.  I'm happy to help test this.  I'd rather use JDK logging 
than log4j if possible to avoid an additional deployment dependency.

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


Re: How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-02 Thread Adrian Robert
On Mar 2, 2005, at 12:25 AM, Jacob Kjome wrote:
You first talk about ServletContext.log(), but then talk about log4j  
loggers in your app.  These are two completely separate things.  Which  
were you focusing on?  With your setup, it it makes sense that  
ServletContext.log() messages are going to catalina.log.  However, if  
you have log4j.jar in WEB-INF/lib and your application log4j logging  
is going to catalina.log, then your setup is different than what you  
describe here.  There is quite simply no way that can happen given the  
setup you've described.  They should go to bar.log since that's the  
only appender that your application's log4j configuration can see.  In  
any case, you don't need a separate log4j.jar in WEB-INF/lib for  
ServletContext.log() messages to go to app-specific log files.  Just  
define those in your log4j.properties just like you have defined the  
host logger.  Here's my setup for Log4j-1.2.9 in  
common/classes.log4j.properties (You can use log4j.xml when using  
Log4j-1.3 because it uses a the new JoranConfigurator which doesn't  
define a log4j.dtd.  The current DOMConfigurator's dtd defines the  
logger name attribute as an ID and the host and context logger  
names that Tomcat uses characters not allowed in attributes of type  
id)
Thanks for your input.. I realize I wasn't clear about one thing.  I  
don't want to define webapp-specific logging in the tomcat-global  
log4j.properties file.  Instead, I want individual log4j.properties  
stored under webapp/*/WEB-INF/classes to cause logging to web-app  
specific files, without the container needing to be hard-coded for the  
webapps it is hosting.  I was trying to achieve this with multiple  
separate log4j.properties, one in the container (common/classes/) for  
the uncaught stack trace and other general logging, and others in each  
webapp.  With my setup below I was expecting to get THREE files:  
catalina.out (with stdout/err), tomcat.log (with the container's log4j  
output), and bar.log (with the webapp's log4j output, which I changed  
from ServletContext.log() to use Logger.info()).  Instead, I got only  
catalina.out and tomcat.log, the latter containing everything that I  
thought the webapp would be sending to bar.log.


...
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localho 
st].[/myapp]=INFO, MYAPP
log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[loc 
alhost].[/myapp]=false
I don't understand this bracket notation.  Is it documented anywhere?   
Is interpretation of it something implemented by tomcat or by log4j?   
Would it help me achieve what I'm trying to get without changing my  
webapp's code away from ServletContext.log()?


BTW, you don't need commons-logging in your webapp.  It is only Tomcat  
that needs it, so just put it in common/lib, not WEB-INF/lib.  You can  
continue to put log4j.jar in both places if you desire.  Otherwise,  
you can also use a repository selector to separate webapp logging with  
a single log4j.jar in common/lib.  This makes more sense to start  
doing with Log4j-1.3, though, using the ContextJNDISelector.  You get  
the same effect by having log4j.jar in WEB-INF/lib since the  
classloader isolation will, effectively, create logging isolation per  
webapp.
Hmm..  I'm using log4j-1.2.9.  I had the jar in both places but wasn't  
getting the isolation since my webapp was still pumping things into  
tomcat.log according to the container's log4j.properties..  However,  
I'm creating the logger in a static block in one of my webapp's classes  
-- could that have been the issue?



At 06:18 PM 3/1/2005 -0500, you wrote:
I'm having trouble approximating the earlier tomcat per-context
Logger functionality using log4j under tomcat-5.5.  Basically, I
would like to have one file coming out under $CATALINA_BASE/logs/ per
web application context.  This appears to be no longer possible  
through
ServletContext.log().  So I tried using log4j:

1) put log4j.jar, commons-logging.jar in common/lib AND
webapps/*/WEB-INF/lib
2) put log4j.properties in common/classes AND  
webapps/*/WEB-INF/classes

However, I can't seem to find the right combination of  
log4j.properties
lines, or maybe I'm trying something impossible.  (I can't find good
docs on the uses of log4j.properties when used inside the hierarchical
classloading context that tomcat provides.)  What keeps happening is
that the webapp's log statements keep going into the global tomcat  
log.
  Would I be better off with JDK logging instead?

common/classes/log4j.properties
---
log4j.rootLogger   info, R
log4j.appender.R   org.apache.log4j.RollingFileAppender
log4j.appender.R.File  ${catalina.base}/logs/tomcat.log
log4j.appender.R.MaxFileSize   10MB
log4j.appender.R.MaxBackupIndex10
log4j.appender.R.layoutorg.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern  %p %t %c - %m%n


Re: Migration from Tomcat 4.1 to Tomcat 5.0

2005-03-02 Thread Adrian Robert
On Mar 2, 2005, at 9:39 AM, Kiran Patel wrote:
Thank you.
I setup an environment variable JAVS_HOME and it is working now.
Now, I have another question.  How to setup a context?  In Tomcat 4.1,  
I have it in server.xml.  What I found from the documentation is that  
to create a separate file for context, but I don't know where to put  
the file and what to include in it.  The context for my webapps in  
server.xml is as follow.  Please help.
Put the Context tag and everything it contains in a file named CA.xml  
(maybe the name can be anything) and put it in  
$CATALINA_BASE/conf/Catalina/localhost/ .  You can also toss it in a  
META-INF directory under your web-app, but I'm not sure if this goes at  
the top level or under WEB-INF.


!-- Class Act App Context --
 Context path=/CA docBase=ca debug=0
   reloadable=true
   Logger className=org.apache.catalina.logger.FileLogger
prefix=localhost_ca_log. suffix=.txt
timestamp=true/
   ResourceParams name=jdbc/cms
  !-- DBCP --
   
parameternamefactory/ 
namevalueorg.apache.commons.dbcp.BasicDataSourceFactory/value/ 
parameter

  !-- Maximum number of dB connections in pool. Make sure you
   configure your mysqld max_connections large enough to handle
   all of your db connections. Set to 0 for no limit.
  --
  parameternamemaxActive/namevalue100/value/parameter
  !-- Maximum number of idle dB connections to retain in pool.
   Set to 0 for no limit.
  --
  parameternamemaxIdle/namevalue30/value/parameter
  !-- Maximum time to wait for a dB connection to become available
   in ms, in this example 10 seconds. An Exception is thrown if
   this timeout is exceeded.  Set to -1 to wait indefinitely.
   --
   parameternamemaxWait/namevalue1/value/parameter
   !-- dB username and password for dB connections --
   parameternameusername/namevaluesa/value/parameter
   parameternamepassword/namevalueadmin/value/parameter
   !-- Class name for JDBC driver --

parameternamedriverClassName/ 
namevaluesun.jdbc.odbc.JdbcOdbcDriver/value/parameter

   !-- The JDBC connection url for connecting to your dB --

parameternameurl/namevaluejdbc:odbc:cms-rms/value/ 
parameter

 /ResourceParams
 /Context
Kiran Patel
Software Engineer
Solutions Inc.
817.637.9060 [Work]

hi!

look at your environment-variables JAVA_HOME should be set correctly!


hth

-Christianx

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


How to approximate tomcat-5.0/4.x/3.x logging in 5.5?

2005-03-01 Thread Adrian Robert
I'm having trouble approximating the earlier tomcat per-context  
Logger functionality using log4j under tomcat-5.5.  Basically, I  
would like to have one file coming out under $CATALINA_BASE/logs/ per  
web application context.  This appears to be no longer possible through  
ServletContext.log().  So I tried using log4j:

1) put log4j.jar, commons-logging.jar in common/lib AND  
webapps/*/WEB-INF/lib
2) put log4j.properties in common/classes AND webapps/*/WEB-INF/classes

However, I can't seem to find the right combination of log4j.properties  
lines, or maybe I'm trying something impossible.  (I can't find good  
docs on the uses of log4j.properties when used inside the hierarchical  
classloading context that tomcat provides.)  What keeps happening is  
that the webapp's log statements keep going into the global tomcat log.  
 Would I be better off with JDK logging instead?

common/classes/log4j.properties
---
log4j.rootLoggerinfo, R
log4j.appender.Rorg.apache.log4j.RollingFileAppender
log4j.appender.R.File   ${catalina.base}/logs/tomcat.log
log4j.appender.R.MaxFileSize10MB
log4j.appender.R.MaxBackupIndex 10
log4j.appender.R.layout org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern   %p %t %c - %m%n
#log4j.logger.org.apache.catalina   info, R
#log4j.logger.org.apache.catalina.session   info, R
#log4j.logger.org.apache.catalina.session.ManagerBase   info, R
log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhos 
t]=info, R
---

webapp/*/classes/log4j.properties
---
# is this necessary?  tried with and without...
log4j.rootLoggerinfo, A1
log4j.category.com.foo  , A1
log4j.appender.A1   org.apache.log4j.DailyRollingFileAppender
log4j.appender.A1.File  ${catalina.base}/logs/bar.log
log4j.appender.A1.MaxFileSize   10MB
log4j.appender.A1.MaxBackupIndex10
log4j.appender.A1.layoutorg.apache.log4j.PatternLayout
log4j.appender.A1.Appendtrue
log4j.appender.A1.layout.ConversionPattern  %p %t %c - %m%n
log4j.logger.com.fooinfo, A1
---
Code in webapp:
---
Logger logger = Logger.getLogger(com.foo);
logger.info(bar);
---
Any help appreciated..
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Class GtorActionServlet is not a Servlet

2005-02-21 Thread Adrian Wilford
Hi,
I am having a problem with Tomcat - I am running JBOSS 4.0.1 using Tomcat as 
the web container, and I am getting this odd Exception thrown, it says that 
my class (which definitely extends Servlet) is not a Servlet ?!?!?

I see that a ClassCastException is the root cause.

Anyone have any idea what may cause this?

Any help appreciated.

Thanks,
Adrian Wilford 

(see stack trace below)

14:47:51,278 INFO  [TomcatDeployer] deploy, ctxPath=/, 
warUrl=file:/usr/local/bin/jboss-4.0.0/server/default/tmp/deploy/tmp18955Gtor.ear-contents/Gtor-exp.war/
14:47:51,811 INFO  [Engine] StandardContext[]Marking servlet Gtor as 
unavailable
14:47:51,812 ERROR [Engine] StandardContext[]Servlet  threw load() exception
javax.servlet.ServletException: Class GtorActionServlet is not a Servlet
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:991)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at 
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5441)
at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at 
org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at 
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:336)
at 
org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:83)
at 
org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:370)
at org.jboss.web.WebModule.startModule(WebModule.java:62)
at org.jboss.web.WebModule.startService(WebModule.java:40)
at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
at 
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at 
org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy24.start(Unknown Source)
at 
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:362)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:927)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746

Re: Class GtorActionServlet is not a Servlet

2005-02-21 Thread Adrian Wilford
Well you are correct, it does not directly extend HTTPServlet, it extends the 
Struts ActionServlet (which extends HttpServlet).
This Servlet worked previously, until I tried to package the war inside an ear 
file and move the classes into a common jar file inside the ear.
(I have added a web services interface in a separate war file).
In the Manifest file of both the war files, I have specified the common jar 
file in the Class-Path property.

Here is the class declaration:

import java.io.File;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.apache.struts.action.ActionServlet;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;

public class GtorActionServlet extends ActionServlet{

Thanks,
Adrian



On Monday 21 February 2005 17:15, Michael Greer wrote:
 Could you post the class itself? Perhaps it does _not_ implement
 servlet (most likely scenario).

 On Feb 21, 2005, at 9:41 AM, Adrian Wilford wrote:
  Hi,
  I am having a problem with Tomcat - I am running JBOSS 4.0.1 using
  Tomcat as
  the web container, and I am getting this odd Exception thrown, it says
  that
  my class (which definitely extends Servlet) is not a Servlet ?!?!?

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

-- 

Adrian Wilford
Email (Home): [EMAIL PROTECTED]
Email (Work): [EMAIL PROTECTED]

Work: +27 11 722 7498
Cell: +27 83 260 4034


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



Re: Class GtorActionServlet is not a Servlet

2005-02-21 Thread Adrian Wilford
Hi,
This does not help - the class now implements Servlet, and also extends 
ActionServlet - still get Tomcat saying that this class is not a Servlet.

import java.io.File;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import org.apache.struts.action.ActionServlet;
import org.codeMound.kronos.DBConnectionPool;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;

public class GtorActionServlet extends ActionServlet implements Servlet
{

Thanks,
Adrian

On Monday 21 February 2005 23:37, Michael Greer wrote:
 I would manually declare that class to be implementing the Servlet
 interface. Can't hurt (can it?) if it already does so by its ancestry.
 At least it is quick to add and test.

 On Feb 21, 2005, at 10:28 AM, Adrian Wilford wrote:
  HTTPServlet

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

-- 

Adrian Wilford
Email (Home): [EMAIL PROTECTED]
Email (Work): [EMAIL PROTECTED]

Work: +27 11 722 7498
Cell: +27 83 260 4034


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



how do I unsubscribe from this mailing list?

2004-11-01 Thread Adrian Harrison
can anyone please tell me how to?
 
sent an email to this address but still receiving tomcat emails 
 
[EMAIL PROTECTED]
 
thanks
 
harry
 


Does Oracle 9i thin jdbc driver work in Tomcat 5?

2004-10-23 Thread Adrian Harrison
using tomcat 5.0.28, oracle 9.2.1.0 on windows 2000 (sp4)

having a nightmare here, upgraded from oracle 8i to 9i, downloaded 
installed ojdbc14.jar file in Tomcat's common\lib directory.

Now all I get when trying to create a connection pool is this exception -

2004-10-22 17:04:22 StandardContext[/PRD]action: null
java.lang.NullPointerException
   at
org.apache.commons.dbcp.DelegatingConnection.close(DelegatingConnection.java
:151)
   at
org.apache.commons.dbcp.PoolableConnection.reallyClose(PoolableConnection.ja
va:95)
   at
org.apache.commons.dbcp.PoolableConnectionFactory.destroyObject(PoolableConn
ectionFactory.java:301)
   at
org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS
ource.java:883)
   at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
a:851)
etc...

from my web.xml file -

resource-ref
 descriptionOracle Datasource example/description
 res-ref-namePRDConnectionPool/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

from my app xml file -

   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namedriverClassName/name
 valueoracle.jdbc.driver.OracleDriver/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:oracle:thin:[EMAIL PROTECTED]:1521:dev91/value
   /parameter

Worked fine under 8.1i but now I've hit a brick wall with this one - is it
possible to get these to work together?

Probably doing something really stupid, any ideas?

many thanks

harry




Urgent attention needed to solve mysterious SocketException error

2004-08-05 Thread Adrian G. Klingel
I'm running Tomcat 5.0.25 in our DMZ.  The server crashes every day.  I see
thousands and thousands of lines like this in Catalina.out:
 
Aug 5, 2004 10:50:31 AM org.apache.tomcat.util.net.TcpWorkerThread runIt
SEVERE: Remote Host /xx.xx.xx.1 SocketException: Invalid argument
 
That IP (obfuscated) is our gateway.  The application on this server is not
distributed, it does make some calls to an external database.
 
I can't find any documentation on this error.  I found one reference to
someone else who had the problem, but there were no solutions offered.
 
Any help is greatly appreciated.
 
Sincerely,
Adrian

 


Re: Tomcat process memory growth

2004-06-30 Thread Adrian Barnett
On Wed, 30 Jun 2004 18:05:01 +0530, Surendra Kumar [EMAIL PROTECTED]  
wrote:

Hi
I am using Tomcat 4.1.29 and JDK 1.4.2_04 in my application.  The  
total memory of the process ( VM + Real Memory)
keeps on increasing.  The heap size of VM is not increasing  
( verified by printing the free memory) , but the total memory
used by the process increasing.
   Any ideas on how to fix it ?
Are you using mod_jk2 to connect to Apache?
If so, try adding the line
request.registerRequests=false
to your jk2.properties file.
I was also getting a memory-creep until I set that flag.
--
Can you see the fnords yet?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Tomcat 5.0.16 behind SSL Accelerator - 2nd post

2004-06-22 Thread Adrian Klingel
I searched for this in the archives at mikal.org, and only found the
question and no answer.

I have Tomcat 5.0.16 behind a hardware SSL accelerator box.  The links in my
webapps of course refer back to HTTP://myserver.com/myapp, but I of course
want them to be rewritten as HTTPS://mysslaccelertor:port/myapp.

Is there a simple configuration change in the server.xml that I can make in
order to fix this?

Thanks,
Adrian Klingel


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



RE: Tomcat 5.0.16 behind SSL Accelerator - 2nd post

2004-06-22 Thread Adrian Klingel
That's the problem though, the browser isn't doing that.  I wonder if that's
a weakness of the version of IE I'm using (6.0.280)?

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 10:19 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Tomcat 5.0.16 behind SSL Accelerator - 2nd post


how are you creating your links right now, the easiest is to just use
relative links, like

a href=/myapp/some.jspA Link/a
here the browser will connect up using same protocol as the data came down
on.

or you can create your own tag, like
a href=app:MyLink href=/myapp/some.jsp/A link using tag/a

Filip

- Original Message -
From: Adrian Klingel [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Tuesday, June 22, 2004 8:20 AM
Subject: Tomcat 5.0.16 behind SSL Accelerator - 2nd post


 I searched for this in the archives at mikal.org, and only found the
 question and no answer.

 I have Tomcat 5.0.16 behind a hardware SSL accelerator box.  The links in
my
 webapps of course refer back to HTTP://myserver.com/myapp, but I of course
 want them to be rewritten as HTTPS://mysslaccelertor:port/myapp.

 Is there a simple configuration change in the server.xml that I can make
in
 order to fix this?

 Thanks,
 Adrian Klingel


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



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



Tomcat 5.0.16 behind SSL Accelerator

2004-06-21 Thread Adrian Klingel
I searched for this in the archives at mikal.org, and only found the
question and no answer.

I have Tomcat 5.0.16 behind a hardware SSL accelerator box.  The links in my
webapps of course refer back to HTTP://myserver.com/myapp, but I of course
want them to be rewritten as HTTPS://mysslaccelertor:port/myapp.

Is there a simple configuration change in the server.xml that I can make in
order to fix this?

Thanks,
Adrian Klingel


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



Tomcat licensing questions

2004-06-21 Thread Adrian Cho
Is there anyone on the list that can answer some questions I have about 
the redistribution of certain files in Tomcat 4.1.30?

Specifically:

servlet.jar appears to be a Sun-originated module but is apparently 
redistributed as part of Tomcat 4.1.30 under the Apache Software License 
1.1.

Is this correct?  I have in the past seen other Sun-originated modules in 
Apache distributions and I'm wondering what the licensing terms of the 
contribution and subsequent redistribution are.

Thanks

Adrian


Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]



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



Matching source for Tomcat binary drops

2004-06-04 Thread Adrian Cho
A team I am working for is redistributing Tomcat 4.1.30 in binary form.  I 
want to inspect all the matching source code.  In other words, if I wanted 
to get the source to rebuild the same set of binaries, where would I get 
this?

The reason is that I did some checking and I found that many of the jars 
in the binary drops, do not have matching source in the Tomcat source 
drop.  The full list I concluded was something like this:

tomcat-http11.jar - all?
tomcat-util.jar - ByteChunk? 
tomcat-coyote.jar - all?
servlet.jar - all?
mx4j-jmx.jar - all?
jakarta-regexp-1.3.jar - all?
commons-modeler.jar - all?
commons-logging-api.jar - all?
commons-logging.jra - all?
commons-digester.jar - all?
commons-collections.jar - all?
commons-beanutils.jar - all?

a) Now for some of these such as commons-logging.jar, 
jakarta-regexp-1.3.jar, etc. I can see some source drops on the source 
download page linked from the Tomcat page although I don't know which 
version of these packages is used in (for example) Tomcat 4.1.30 so I 
don't know which version of the source I should get.

b) I can't find other packages such as tomcat-http11.jar, 
tomcat-coyote-jar and servlet.jar anywhere.

c) At least one package (tomcat-util.jar) seems to have source for most of 
the classes in the Tomcat source drop but at least one class (ByteChunk) 
is not there.

I'd appreciate any hints as how I can find the exact matching source for 
what is in the Tomcat 4.1.30 binary drop.

Thanks

Adrian

Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]

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



RE: Matching source for Tomcat binary drops

2004-06-04 Thread Adrian Cho
Yes I did although I didn't check it until I realised I had posted to the 
list owner instead of the list.

In response to off-list reply:

I'm wondering what the point of the Tomcat source drop is if one has to go 
to CVS to get the source for modules such as tomcat-http11 and 
tomcat-coyote.jar and why would a class such as say ByteChunk in 
tomcat-util.jar have no corresponding source in the corresponding source 
drop?

I think it would be useful for those that want all the corresponding 
source for a Tomcat binary drop, to know what source is missing from the 
Tomcat source drops.


Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]



Shapira, Yoav [EMAIL PROTECTED] 
06/04/2004 09:20 AM
Please respond to
Tomcat Users List


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Matching source for Tomcat binary drops







Hi,
You got my answer yesterday, right?  This seems to still be the initial
question.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Adrian Cho [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 9:16 AM
To: [EMAIL PROTECTED]
Subject: Matching source for Tomcat binary drops

A team I am working for is redistributing Tomcat 4.1.30 in binary form.
I
want to inspect all the matching source code.  In other words, if I
wanted
to get the source to rebuild the same set of binaries, where would I
get
this?

The reason is that I did some checking and I found that many of the
jars
in the binary drops, do not have matching source in the Tomcat source
drop.  The full list I concluded was something like this:

tomcat-http11.jar - all?
tomcat-util.jar - ByteChunk?
tomcat-coyote.jar - all?
servlet.jar - all?
mx4j-jmx.jar - all?
jakarta-regexp-1.3.jar - all?
commons-modeler.jar - all?
commons-logging-api.jar - all?
commons-logging.jra - all?
commons-digester.jar - all?
commons-collections.jar - all?
commons-beanutils.jar - all?

a) Now for some of these such as commons-logging.jar,
jakarta-regexp-1.3.jar, etc. I can see some source drops on the source
download page linked from the Tomcat page although I don't know which
version of these packages is used in (for example) Tomcat 4.1.30 so I
don't know which version of the source I should get.

b) I can't find other packages such as tomcat-http11.jar,
tomcat-coyote-jar and servlet.jar anywhere.

c) At least one package (tomcat-util.jar) seems to have source for most
of
the classes in the Tomcat source drop but at least one class
(ByteChunk)
is not there.

I'd appreciate any hints as how I can find the exact matching source
for
what is in the Tomcat 4.1.30 binary drop.

Thanks

Adrian

Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]

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




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, 
proprietary and/or privileged.  This e-mail is intended only for the 
individual(s) to whom it is addressed, and may not be saved, copied, 
printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your 
computer system and notify the sender.  Thank you.


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




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



RE: Matching source for Tomcat binary drops

2004-06-04 Thread Adrian Cho
Yoav

I didn't misunderstand your reply or perhaps I did and I don't reliease. 
It does seem however that there is some knowledge of what source one 
should get in order get a complete matching source tree for a given Tomcat 
binary release, that is not obvious at least to me.  If I go to the Apache 
site and download the source for Tomcat 4.1.30, I do not find 
ByteChunk.java in there.  Have I missed it or is there another source zip 
I must download?  I understand that the source for MX4J and 
commons-logging and other discrete packages is maintained elsewhere (at 
Apache.org or somewhere else) but there seem to be some specific classes 
that I am missing and unless I believe there is no need to go to CVS since 
the source distro contains source code from all relevant CVS modules.

Adrian

Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]



Shapira, Yoav [EMAIL PROTECTED] 
06/04/2004 01:39 PM
Please respond to
Tomcat Users List


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Matching source for Tomcat binary drops







Hi,
You misunderstood my reply.  All the TOMCAT source code for a given
TOMCAT release is available in the source distribution for that release.
So jakarta-tomcat-5.0.25-src.zip contains all the TOMCAT source code for
that release.  I'm highling TOMCAT because source code for other
libraries that tomcat uses/depends upon is obviously not included in the
tomcat source distribution.

When we package binaries, we split into different jars for various
reasons, so it ends up in tomcat-coyote.jar, tomcat-util.jar, etc,
rather than one big tomcat.jar.  This is a standard practice followed by
most vendors and products.

There are several CVS modules comprising the tomcat source, but that's a
separate issue from the source distro, as the source distro contains
source code from all relevant CVS modules.

I'm not sure I understand your ByteChunk example.
org.apache.tomcat.util.buf.ByteChunk.class is in
$CATALINA_HOME/server/lib/tomcat-util.jar.  If you download a source
distro, you will find org.apache.tomcat.util.buf.ByteChunk.java without
a problem, at
jakarta-tomcat-[VERSION]-src/jakarta-tomcat-connectors/util/java/org/apa
che/tomcat/util/buf.  If you don't know the path, you can do a simple
file search or find to find it.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Adrian Cho [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 12:49 PM
To: Tomcat Users List
Subject: RE: Matching source for Tomcat binary drops

Yes I did although I didn't check it until I realised I had posted to
the
list owner instead of the list.

In response to off-list reply:

I'm wondering what the point of the Tomcat source drop is if one has to
go
to CVS to get the source for modules such as tomcat-http11 and
tomcat-coyote.jar and why would a class such as say ByteChunk in
tomcat-util.jar have no corresponding source in the corresponding
source
drop?

I think it would be useful for those that want all the corresponding
source for a Tomcat binary drop, to know what source is missing from
the
Tomcat source drops.


Adrian Cho
Manager, Intellectual Property
IBM Ottawa Lab
2670 Queensview Drive
Ottawa, Canada K2B 8K1
Phone: (613) 726-5536
Fax: (613) 820 1202
Website:  http://www.can.ibm.com/ottawalab/
E-mail: [EMAIL PROTECTED]



Shapira, Yoav [EMAIL PROTECTED]
06/04/2004 09:20 AM
Please respond to
Tomcat Users List


To
Tomcat Users List [EMAIL PROTECTED]
cc

Subject
RE: Matching source for Tomcat binary drops







Hi,
You got my answer yesterday, right?  This seems to still be the initial
question.

Yoav Shapira
Millennium Research Informatics


-Original Message-
From: Adrian Cho [mailto:[EMAIL PROTECTED]
Sent: Friday, June 04, 2004 9:16 AM
To: [EMAIL PROTECTED]
Subject: Matching source for Tomcat binary drops

A team I am working for is redistributing Tomcat 4.1.30 in binary
form.
I
want to inspect all the matching source code.  In other words, if I
wanted
to get the source to rebuild the same set of binaries, where would I
get
this?

The reason is that I did some checking and I found that many of the
jars
in the binary drops, do not have matching source in the Tomcat source
drop.  The full list I concluded was something like this:

tomcat-http11.jar - all?
tomcat-util.jar - ByteChunk?
tomcat-coyote.jar - all?
servlet.jar - all?
mx4j-jmx.jar - all?
jakarta-regexp-1.3.jar - all?
commons-modeler.jar - all?
commons-logging-api.jar - all?
commons-logging.jra - all?
commons-digester.jar - all?
commons-collections.jar - all?
commons-beanutils.jar - all?

a) Now for some of these such as commons-logging.jar,
jakarta-regexp-1.3.jar, etc. I can see some source drops on the source
download page linked from the Tomcat page although I don't know which
version of these packages is used in (for example) Tomcat

Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass

2004-06-02 Thread Adrian Barnett

Ran out of memory last night again
Set to 512m and ran out at 284m
Maybe I am missing a paramater in the tomcat setup on windows or  
something

Frustrating
James
I was having a memory leak using mod_jk2, and it was fixed by adding
request.registerRequests=false
to tomcat/conf/jk2.properties.
I don't know if this would work with mod_jk, but it might be worth a try.
Adrian
--
f y cn rd ths y cn gt a gd jb rt fpl dgm pvq!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass

2004-06-02 Thread Adrian Barnett
On Wed, 2 Jun 2004 11:48:02 -0400, Chad Morris [EMAIL PROTECTED]  
wrote:

This sounds awfully similar to what we are experiencing, although I have  
not determined that it is a jk2 related memory leak.  Are you using some  
sort of profiling tool to determine this?  And exactly what does  
request.registerRequests=false do?
Don't know what it does (other than stopping jk2 registering requests, I'd  
guess)
or why it works. It was mentioned on this very mailing list
a few weeks ago, in response to a previous memory-leak thread, so I tried  
it and
it worked.
Not very scientific, I know...
Adrian

--
f y cn rd ths y cn gt a gd jb rt fpl dgm pvq!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Apache2/Tomcat5/mod_jk2 problems

2004-05-11 Thread Adrian Barnett
Hi,
I'm having an annoying memory leak problem in tomcat5 on Redhat 9. The memory 
gradually creeps up until the JVM runs out of memory. (I've been using JMeter to send 
thousands of requests to tomcat)
Now, if I run the tests against tomcat by itself (via port 8080) it is fine and stable, the problem only occurs when I use port 80 to go via Apache.

After trying numerous different things, suspicion falls on mod_jk2. The docs on mod_jk2 are not very helpful. Some say that mod_jk2 is better than mod_jk and should be used in place of it, others say that mod_jk2 is not stable enough for production use yet and mod_jk should be used instead.

Also, we are using the JNI mode of communication for mod_jk2, rather than Unix sockets.

So, my questions are:
1) Which is safest - mod_jk or mod_jk2?
2) Are there docs which describe when/why you should JNI or Unix sockets (or any other 
method), and what the advantages/disadvantages are?
3) Anybody got any other clues as to what could cause a leak like this? (I've searched 
many tomcat mail archives but found nothing of use)
Cheers,
Adrian Barnett
--

OK, Sam, sighed Frodo, I've changed my mind. You can kill him now.



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


Re: Apache2/Tomcat5/mod_jk2 problems

2004-05-11 Thread Adrian Barnett
On Wed, 12 May 2004 00:05:09 +0800, Chong Yu Meng [EMAIL PROTECTED] wrote:

Hi,

Another way to verify if the connectors are really giving you the problems (as opposed to the application) is to setup Apache as a reverse proxy and proxy all requests to Tomcat. There is documentation on this on the Tomcat site. My suspicion is that it could be your application.
Well, that's what I suspected as well, but then discovered that the same thing 
happens if I repeatedly load the jsp-examples pages that came with tomcat. Memory 
creeps up, tomcat falls over.
Cheers,
Adrian
--

OK, Sam, sighed Frodo, I've changed my mind. You can kill him now.



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


Tomcat stops loading when I run my servlet with load-on-startup

2004-04-23 Thread Adrian Klingel
I have a servlet which calls a method on itself to poll a directory for XML
files.  When one is found, another method (read() is called which then
creates a SAX parser and attempts to validate the file against an XML
schema.  Upon calling the parse() method, Tomcat freezes.  It doesn't
create or write to a log, and nothing else starts up.  Nothing is accessible
on port 8080, because Tomcat doesn't make it to the point where it mounts
that port.

When I remove the load-on-startup from this particular app's web.xml,
Tomcat completes its startup process and things are accessible.  I can then
reintroduce the load-on-startup to the web.xml and Tomcat will
automatically kick off the servlet.  This time nothing freezes, and the
program runs as it is supposed to.

My program is attempting to validate this XML file against a schema which is
accessible locally on port 8080.  But that port is prevented from becoming
available, so the program will just wait forever.

My question is, how can I prevent my servlet from starting up until after
Tomcat has completed its startup procedure?  I've specified higher numbers
in the load-on-startup element, but to no avail.

Thanks for any help you can offer.


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



FW: Tomcat stops loading when I run my servlet with load-on-startup

2004-04-23 Thread Adrian Klingel
Justin,

I followed your advice immediately, but the exact same thing happens.

Just to restate the issue, my servlet hangs because it needs to obtain an
XML Schema from localhost:8080.  But it can't get it, because Tomcat won't
finish loading until the servlet is finished.  But the servlet won't finish
until Tomcat finishes loading.  Etcetera, etcetera ad infinitum.

I've got some sort of logic issue here.  If I want to kick off a program
that polls a directory for XML files, should I probably do something where I
kick off an independent thread, so that Tomcat is not waiting for my program
to finish (which if it's a good poller, it never will)?

Thanks,
Adrian


-Original Message-
From: Adrian Klingel [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 23, 2004 6:52 PM
To: Adrian Klingel - Exaweb
Subject: FW: Tomcat stops loading when I run my servlet with
load-on-startup



-Original Message-
From: Justin Ruthenbeck [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 6:47 PM
To: Tomcat Users List
Subject: Re: Tomcat stops loading when I run my servlet with
load-on-startup



Yes.  Rip out the load-on-startup.  Now.  Don't wait till 
Monday.  Replace with a context listener (see: 
javax.servlet.ServletContextListener).  Relax and have a stress-free 
weekend.

justin

At 01:55 PM 4/23/2004, you wrote:
Look at listeners. I think there was a similar thread a while back and the
solution was to have a listener kick off the servlet after all the other
processes were done. You could also have your servlet start and then wait
for a certain amount of time, to allow time for all other processes to
start.

Doug


- Original Message -
From: Adrian Klingel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 23, 2004 4:03 PM
Subject: Tomcat stops loading when I run my servlet with load-on-startup


  I have a servlet which calls a method on itself to poll a directory for
XML
  files.  When one is found, another method (read() is called which 
 then
  creates a SAX parser and attempts to validate the file against an XML
  schema.  Upon calling the parse() method, Tomcat freezes.  It doesn't
  create or write to a log, and nothing else starts up.  Nothing is
accessible
  on port 8080, because Tomcat doesn't make it to the point where it 
 mounts
  that port.
 
  When I remove the load-on-startup from this particular app's web.xml,
  Tomcat completes its startup process and things are accessible.  I can
then
  reintroduce the load-on-startup to the web.xml and Tomcat will
  automatically kick off the servlet.  This time nothing freezes, and the
  program runs as it is supposed to.
 
  My program is attempting to validate this XML file against a schema 
 which
is
  accessible locally on port 8080.  But that port is prevented from 
 becoming
  available, so the program will just wait forever.
 
  My question is, how can I prevent my servlet from starting up until 
 after
  Tomcat has completed its startup procedure?  I've specified higher 
 numbers
  in the load-on-startup element, but to no avail.
 
  Thanks for any help you can offer.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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


__
Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential. See:
http://www.nextengine.com/confidentiality.php
__


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







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



Re: Tomcat Configuration with Apache Virtual Hosts

2004-04-05 Thread Adrian Lanning
Hi Mike,

jk_module and JkMount will only work if you are using JK.  You are using JK2
so you should go back to your original configuration.

Looking back at your log output, I noticed an error about a JNI lib not
being found.  I am fairly certain that using Unix Sockets requires JNI so
that may be the root cause of your problem.  Make sure you compiled jk2 with
jni and that the jni lib (jkjni.so) is in the right location.

Maybe you should just try using regular channel sockets rather than unix
sockets ( it seems to be defaulting to that anyways but I don't know for
sure).

hth,
Adrian Lanning

 snip from your log output 
INFO: APR not loaded, disabling jni components: java.io.IOException:
java.lang.UnsatisfiedLinkError: /usr/local/apache2/modules/jkjni.so:
/usr/local/apache2/lib/libaprutil-0.so.0: undefined symbol: gdbm_errno
Mar 25, 2004 11:50:11 AM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
 end snip 

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



Re: Question on debuggin JNDI/prepared statement in a bean

2004-03-26 Thread Adrian Lanning
This topic doesn't really have anything to do with Tomcat so you might have
better luck receiving help on some other mailing list.  Anybody know which
list he should be posting to?

What is the actual problem you are having?

Do you execute your prepared statement somewhere?

Adrian


- Original Message - 
From: Harry Mantheakis [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 26, 2004 3:28 AM
Subject: Re: Question on debuggin JNDI/prepared statement in a bean


Hello

 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

Are those two parameters - 'ClassifiedAd' and 'UniqueDateId' - variables?
They should be, and if so, where do you declare and initialise them? They do
not appear in the method you posted.

Harry


 I am frustrated trying to debug a prepared statement within a bean; what
 am I doing wrong?; ANY clues appreciatedS
 It is not throwing any exceptions yet I methodically went over the code;
 granted this is the first time I used beans versus servlets.

 Can anyone point me to a good example (JNDI, JSP, JavaBean, Resultset)

 Code within bean:

 private void prepareStatement(){
   try{

   Context env = (Context) new
 InitialContext().lookup(java:comp/env);
   pool = (DataSource) env.lookup(jdbc/myDB);

   if (pool == null)
   throw new NamingException(`jdbc/ myDB ' is an
 unknown DataSource);



 //dbConnection = null;
 dbConnection = pool.getConnection();


 String SQLCmd =
 select * from AdInfoView where Classification = ?
 
  + and UniqueDateId  ? order by UniqueDateId
 desc;

 pstmt = dbConnection.prepareStatement(SQLCmd);
 // TEST Exception thrown here.
 //pstmt.setString(1,searchWord);
 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

   }catch(Exception e){
 System.err.println(Problem preparing statement  +
 e.getMessage() + e.getCause());
   }
 }

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003




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


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



Re: Question on debuggin JNDI/prepared statement in a bean

2004-03-26 Thread Adrian Lanning
Hey Tom,

When I said your thread was off-topic I didn't mean to imply you couldn't
post your question!  Sorry if that's how it came across.  Just thought you
should mark it [OT] as Yoav pointed out. It appears I was wrong anyways; I
missed the part about it working in Resin and not in Tomcat.

As for your question, what is it exactly that goes wrong with your app now
that its running under Tomcat and not Resin?  Trouble getting the data to
your jsp?  Is it not starting up?  The code you posted doesn't actually DO
anything so I'm guessing that's just an example you put together to
illustrate what you're trying to do?

Could you post the parts of your Context regarding the jndi resource you are
configuring?

Adrian

- Original Message - 
From: Tom K [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 26, 2004 9:41 AM
Subject: RE: Question on debuggin JNDI/prepared statement in a bean


Harry,

Yes the ClassifiedAd and UniqueDateId are two parameters taken
from an html form, the values of ClassifiedAd and UniqueDateId are used
in a prepared statement for substitution of ? and ? the results are then
forwarded to a results jsp, which used the getXXX() to retrieve the
values from the bean.
I have this code working in another form as a Servlet using JNDI
and prepared statements. In the servlet the JNDI connection is made in
the init(blah, blah) and calls the super.init(config) which I
super.init(config) is implicit from reading the Tomcat docs.
The bottom line on this, is how do you set up a JNDI connection
in a bean, use a prepared statement (in a bean), retrieve a resultset
and forward the result for the results jsp to retrieve the value from
the bean.

Finally, I apologize to those who feel this is off topic. I have similar
code working in Resin but for the life of me, I can't get it working
with Tomcat 5  :-(   I searched all the archives and can't find a good
example for doing this.

TIA Tom K.






-Original Message-
From: Harry Mantheakis [mailto:[EMAIL PROTECTED]
Sent: Friday, March 26, 2004 2:29 AM
To: Tomcat Users List
Subject: Re: Question on debuggin JNDI/prepared statement in a bean

Hello

 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

Are those two parameters - 'ClassifiedAd' and 'UniqueDateId' -
variables?
They should be, and if so, where do you declare and initialise them?
They do
not appear in the method you posted.

Harry


 I am frustrated trying to debug a prepared statement within a bean;
what
 am I doing wrong?; ANY clues appreciated
 It is not throwing any exceptions yet I methodically went over the
code;
 granted this is the first time I used beans versus servlets.

 Can anyone point me to a good example (JNDI, JSP, JavaBean, Resultset)

 Code within bean:

 private void prepareStatement(){
   try{

   Context env = (Context) new
 InitialContext().lookup(java:comp/env);
   pool = (DataSource) env.lookup(jdbc/myDB);

   if (pool == null)
   throw new NamingException(`jdbc/ myDB ' is an
 unknown DataSource);



 //dbConnection = null;
 dbConnection = pool.getConnection();


 String SQLCmd =
 select * from AdInfoView where Classification = ?
 
  + and UniqueDateId  ? order by UniqueDateId
 desc;

 pstmt = dbConnection.prepareStatement(SQLCmd);
 // TEST Exception thrown here.
 //pstmt.setString(1,searchWord);
 pstmt.setString(1,ClassifiedAd);
 pstmt.setString(2,UniqueDateId);

   }catch(Exception e){
 System.err.println(Problem preparing statement  +
 e.getMessage() + e.getCause());
   }
 }

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003



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


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



Re: [OT] Needed : New home(s) for Tomcat on Linux StepByStep

2004-03-25 Thread Adrian Lanning
Chong,

I think the wiki idea is a great one but have you thought about asking any
of the online Java magz or sites about hosting it for you?  It seems to me
that the more traffic they get, the happier they are.  You would have to put
up with ads on your tut, of course.  I have seen several tutorials /
walkthroughs on such sites.

Besides the ads, the only problem might be change control since I'm not sure
how often they let authors edit articles.

Adrian


- Original Message - 
From: Chong Yu Meng [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 12:20 PM
Subject: Re: [OT] Needed : New home(s) for Tomcat on Linux StepByStep


 Hi Tim !

 Tim Funk wrote:

  The drawback (which is a good drawback!) is the tomcat4 and tomcat5
  links below contain many files and can easily grow to many more as it
  becomes more comprehensive.
 
 Thanks, Tim !

  The docs are not FAQ worthy but definitely worth linking to from the
FAQ.

 Well, the documents weren't written to be a FAQ, and I think the
 structure does not lend itself well to a FAQ. The reason why I wrote it
 that way was because a lot of answers in FAQs assume or require a level
 of understanding that newbie Tomcat administrators may not possess.
 Instead of trying to cover the background and theory behind every
 question, I thought a walk-through tutorial would be  a more effective
 way of building up understanding of the product.

 
  Here is my preference ...
  Copy the content of http://cymulacrum.net/writings/tomcat5/book1.html
  and http://cymulacrum.net/writings/tomcat4/book1.html to the Wiki.
 
  The book (after being copied to wiki) could be linked from the above
  links OR we could create a new link in the FAQ.
 
  This way - anyone may maintain/add/edit the content without needing
  any additional privledges.
 
 Actually, I like the Wiki idea, but maybe more along the lines of the
 MySQL documentation (http://www.mysql.com/doc/en/index.html), where
 users can add sections and comments. This would maintain the narrative
 integrity while allowing for digressions.

  I like it when many different people can(and do) write docs. Even if
  10 people write about the same thing - they may say it in different
  ways, have a different nuance with their writing style, or emphasis a
  particular problem they had which can be helpful to such a diverse
  audience.

 I think we need more people writing docs for Tomcat. Though installation
 and basic configuration is covered quite well, and there is a LOT of
 stuff out there on Apache connectors, some advanced stuff, like writing
 your own realms or JNDI realms, or even the recent discussions about
 JNDI datasources are not covered -- or if they are, not adequately.

 
  Some people may be thinking this is kludgey. Yes it is. But I think
  its an OK tradeoff so we can keep the barrier of documentation
  creation low.
 
 Here, here. But I need to say a little something about my documents. The
 original document is actually in Docbook format, and I generate the HTML
 from that document using docbook utilities. If you want to put it into
 the Wiki, you'll need only the HTML (without the masthead), am I right ?
 I've never used Wiki before, so I may need help here.

 

 -- 
 Men never do evil so completely and cheerfully as when they do it from
 religious conviction.
 -- Blaise Pascal
 ++
 | Pascal Chong   |
 | email: [EMAIL PROTECTED]  |
 ||
 | Please visit my site at : http://cymulacrum.net|
 | If you're using my documentation, please read the Terms and|
 | and Conditions at http://cymulacrum.net/terms.html |
 ++



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



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



Re: [OT] Needed : New home(s) for Tomcat on Linux StepByStep

2004-03-25 Thread Adrian Lanning
Hey Chong,

How much daily bandwidth does hosting your tut currently use?

If it takes less than 50MB per day you can use SDF to host it.

SDF is a non-profit organization promoting Internet education.  Basically
they have a big cluster of 64-bit servers running NetBSD that they give out
shell access to.  You can find out more about them here:
http://www.freeshell.org
http://www.freeshell.org/index.cgi?faq?BASICS?01

Here is the information on bandwidth usage limits:
http://sdf.lonestar.org/over

Since its a non-profit once you go over quota, users get redirected to the
over page rather than the site staying up and you getting billed.


I have found it to be a really great deal.  An ARPA membership (50MB
transfer limit / day) costs $36 (US) and is a one-time fee (can you believe
it?).  There is no monthly or yearly cost.  I have been a member for over a
year and have a friend who's been a member for over 10 years...

Disclaimer for the paranoid:
  I am not affiliated with SDF in any way other than having paid my $36.
No, I'm not being paid to promote it.  No, there are no banner ads or such.
Yes, I am still waiting for them to close up shop and steal my $36!  :-)

On the flip-side, I have found their service to be reliable and have my
personal website hosted there (that's why I paid the $36).


Hope that helps!
Adrian

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



Re: Configuration Help

2004-03-24 Thread Adrian Lanning
server.xml looks fine as far as I can tell.  Here's what you should do:

1. Verify Tomcat host is working correctly.
To verify that you've got tomcat working correctly with your domain name
change your dev.dynamichostings.com host's appBase to be the same as
localhost's and then try:
http://dev.dynamichostings.com:8080

If you get the tomcat welcome screen (which you will) you know you've set up
the host correctly.
http://localhost:8080http://dev.dynamichostings.com:8080  are now
equivalent as far as Tomcat is concerned.

2. Get your webapp working with Standalone (port 8080)
Verify that your webapp is working correctly by trying:
http://localhost:8080/dynamichostings  OR
http://dev.dynamichostings.com:8080/dynamichostings

(Incidentally, I get a 503 when i try
http://66.80.144.156:8080/dynamichostings so your webapp isn't working now).


3. Get Tomcat connected to Webserver
This is when you get http://dev.dynamichostings.com/dynamichostings to work.
Set up your IIS + JK2 or whatever you are going to use to direct the
requests to Tomcat as appropriate.

4. Point http://dev.dynamichostings.com directly to your webapp.
Change the appBase to point directly to your webapps folder.
Make a new folder under TOMCAT_HOME/conf/Catalina/ called
dev.dynamichostings.com
Make a new file in that folder called webapp.xml (ie. dynamichostings.xml).
In webapp.xml, place a blank context like this:
Context path= docBase= debug=0 privileged=true/Context


And that should do it. If you follow these steps then when you have errors
you will know exactly which component is causing the errors.  As opposed to
now when it could be any one of many things.

Hope that helps,
Adrian





- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:33 AM
Subject: RE: Configuration Help


Ok, I've changed the server.xml file so that engine and at least one
host reference localhost. The ultimate goal is to have Tomcat support
multiple individual web applications and not have multiple context
configurations for one host.

Before, when the server.xml file was configured to use the server's ip
address I was able to get the following URL to work:
http://66.80.144.156/dynamichostings

Now that no longer works since I've changed it to use localhost. I can
only get this URL to work: http://66.80.144.156:8080/dynamichostings

Ultimately I'm trying to get the following to work:
http://dev.dynamichostings.com and several other web applications.


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



Re: Configuration Help

2004-03-24 Thread Adrian Lanning
Works for me!  Glad you got it working.

Cheers on deciding to compile a doc.  As for where to put it...there's a
tomcat wiki at http://wiki.apache.org/jakarta-tomcat/Tomcat
that would be a likely place.  If you have some advice for IIS users on
connecting to Tomcat using JK2 you should let the jk guys know about it and
maybe it'll end up on the connector page.
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/
A how-to down at the bottom of the left menu, for example.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 1:58 PM
Subject: RE: Configuration Help


Oh My Gosh!

Adrian,

Apparently what was missing was the subfolder named
dev.dynamichostings.com with the blank context. Everything else apparently
was configured correctly. Once I created those items it worked immediately.

If you would be so kind as to please verify this for me to ensure I'm not
hallucinating I would very much appreciate it.
http://dev.dynamichostings.com

If you test confirms this configuration I would like to put together a
document that outlines the steps that have been taken to get this working so
others can benefit. Where should something like this be located?

Thank you ever so much!

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 12:36 PM
To: Tomcat Users List
Subject: Re: Configuration Help


server.xml looks fine as far as I can tell.  Here's what you should do:

1. Verify Tomcat host is working correctly.
To verify that you've got tomcat working correctly with your domain name
change your dev.dynamichostings.com host's appBase to be the same as
localhost's and then try:
http://dev.dynamichostings.com:8080

If you get the tomcat welcome screen (which you will) you know you've set up
the host correctly.
http://localhost:8080http://dev.dynamichostings.com:8080  are now
equivalent as far as Tomcat is concerned.

2. Get your webapp working with Standalone (port 8080)
Verify that your webapp is working correctly by trying:
http://localhost:8080/dynamichostings  OR
http://dev.dynamichostings.com:8080/dynamichostings

(Incidentally, I get a 503 when i try
http://66.80.144.156:8080/dynamichostings so your webapp isn't working now).


3. Get Tomcat connected to Webserver
This is when you get http://dev.dynamichostings.com/dynamichostings to work.
Set up your IIS + JK2 or whatever you are going to use to direct the
requests to Tomcat as appropriate.

4. Point http://dev.dynamichostings.com directly to your webapp.
Change the appBase to point directly to your webapps folder.
Make a new folder under TOMCAT_HOME/conf/Catalina/ called
dev.dynamichostings.com
Make a new file in that folder called webapp.xml (ie. dynamichostings.xml).
In webapp.xml, place a blank context like this:
Context path= docBase= debug=0 privileged=true/Context


And that should do it. If you follow these steps then when you have errors
you will know exactly which component is causing the errors.  As opposed to
now when it could be any one of many things.

Hope that helps,
Adrian





- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 24, 2004 9:33 AM
Subject: RE: Configuration Help


Ok, I've changed the server.xml file so that engine and at least one
host reference localhost. The ultimate goal is to have Tomcat support
multiple individual web applications and not have multiple context
configurations for one host.

Before, when the server.xml file was configured to use the server's ip
address I was able to get the following URL to work:
http://66.80.144.156/dynamichostings

Now that no longer works since I've changed it to use localhost. I can
only get this URL to work: http://66.80.144.156:8080/dynamichostings

Ultimately I'm trying to get the following to work:
http://dev.dynamichostings.com and several other web applications.


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


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


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



Re: Configuration Help

2004-03-23 Thread Adrian Lanning
Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

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


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


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


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



Re: Login by parameters (no prompts)

2004-03-23 Thread Adrian Lanning
Hi Jonathan,
Did you solve your problem?

Earlier you asked if you could send two requests, one to log in and another
to download the stuff.  You absolutely can as this is how browsers work.
You just need to keep the session id that tomcat sends back in the header
once you log in and resend it in the header with your new request to
download.  Tomcat can't tell and doesn't care what kind of client you are
using.  I have done this before to make a mass upload desktop tool for a
webapp that only let users upload photos one-at-a-time.

I've never used wget so the next question is can you use wget with custom
headers?  Googling real quick I found you can tell wget to save the cookies
like this:
  wget --keep-session-cookies --save-cookies login.txt PAGE-URL
Since it lets you save the cookies, I'm sure there's a way to use the
cookies again...

If you don't want to do that and you are still having problems you could do
your own authentication rather than container-based.  I mean let all
requests come through as far as Tomcat is concerned but then validate
against a session var in your webapp.  Then you can set up your app to check
for GET vars as well as POST vars (ie. check with
request.getParameter(...) too).  Try JPetStore 3 by Clinton Begin
(www.ibatis.com) as a reference if you've never done this before.  I haven't
tried version 4 yet so don't know if it uses container-based authentication
or not.

hth,
Adrian Lanning



- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 7:21 PM
Subject: Re: Login by parameters (no prompts)


  I don't think so.  The server doesn't care what is requesting the file
  (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as
  it's a valid request.  Your options are still open there.

 This is true.  Although the means of getting the username and password
 into the request is the crux of the problem.  That is where I need a
 solution.  If you are saying that every client will have its own method of
 achieving this, then I agree.  Except that we still haven't established
 that Tomcat will handle it properly using FORM authentication.

  What you might actually be looking at is designing an app to take a
 couple of
  authentication methods (basic  form) depending on the client and just
  send back the file.

 Are you suggesting a second web container that will only handle
 programmatic downloads?  I don't think that the company will go for that
 solution.  If this is not your suggestion, then I assume we are talking
 about configuring Tomcat to handle both types (FORM and BASIC) at the same
 time.  I haven't figured out how to do that.

 Thanks for all the time you're putting into this.  I appreciate it.
 Jonathan.





 David Smith [EMAIL PROTECTED]
 03/22/2004 04:19 PM
 Please respond to Tomcat Users List

 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Re: Login by parameters (no prompts)


 I don't think so.  The server doesn't care what is requesting the file
 (wget, curl, lynx, Mozilla, Netscape, IE, etc, ...) -- just as long as
 it's a valid request.  Your options are still open there.  What you
 might actually be looking at is designing an app to take a couple of
 authentication methods (basic  form) depending on the client and just
 send back the file.

 As far as wget is concerned, take a look at the man pages for it or even
 curl.  Corporate policy shouldn't prohibit it given it does the same
 thing your Netscape or IE is doing, but then again all my work
 experience is at a university.  I have no idea what a corporate
 environment would be like.  I'm not a student - those lucky dogs are on
 Spring Break now :-(.

 --David

 [EMAIL PROTECTED] wrote:

 Yeah, that might work (we'd have to test it).  However, this implies that


 we tie ourselves to WGET as a client app, which we cannot do.  The
 customer controls his own infrastructure and may not have WGET (he might
 be on one of the many Windows platforms out there) or may have a
 corporate
 policy that prohibits the use of WGET.  The same is true of any possible
 client app.  They may even have written their own solution for polling
 the
 downloadable data (as I've seen done in the past).
 
 *sigh*  The best solution would be to authenticate and download in a
 single request.  But how?
 
 Thanks.
 Jonathan.
 
 
 
 
 
 David Smith [EMAIL PROTECTED]
 03/22/2004 03:04 PM
 Please respond to Tomcat Users List
 
 To: Tomcat Users List [EMAIL PROTECTED]
 cc:
 Subject:Re: Login by parameters (no prompts)
 
 
 I was just looking through the man page for wget.  It looks like you
 have the option of using --http-user=... and --http-passwd=... on the
 command line.  Wget will use BASIC or Digest depending on what the
 server wants.  Is that anything you might be able to use?
 
 --David
 
 [EMAIL PROTECTED] wrote:
 
 
 
 Generally, David, I would agree with you about

Re: Struts 1.1 +Tomcat 4.0.4 -- RequestProcessor - Exception

2004-03-23 Thread Adrian Lanning
Hi,
You might have more luck with this in the struts-user mailing list.

Are you using a custom request processor?  If so did you extend
org.apache.struts.action.RequestProcessor or
org.apache.struts.tiles.TilesRequestProcessor?

Adrian


- Original Message - 
From: Namasivayam, Sudhakar (Cognizant) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 12:27 AM
Subject: Struts 1.1 +Tomcat 4.0.4 -- RequestProcessor - Exception




Hi all,

This error happens only in Tomcat 4.0  and not Tomcat 5.0.19 in Linux 7.0.
Am i missing any library files? I have put the latest library files. I did
find similar mail in the struts archives but no response to that...  Or is
this the problem with my manager webapp?

  I do not get Class cast exception message when i stop and start the
webapp. Only when a action is invoked this exception occurs!!
Both the times( stop-start   and   action.do ) it is trying to get the same
RequestProcessor object but the second time it throws an error.

If i insert a try catch block in the ActionServlet class,it works fine...
Can any one explain me why this exception occurs?
I did  verify that  getServletContext().getAttribute(key);  in
ActionServlet.java:855 returns a RequestProcessor object.
Pls find the log and my server.xml at the end of the mail.

Thanks in advance,
Sudhakar


 2004-03-22 15:18:09 Manager: start: Starting web application at '/sfpsr2'
 2004-03-22 15:18:09 StandardHost[localhost]: standardHost.start /sfpsr2
 2004-03-22 15:18:09 StandardContext[/sfpsr2]: Configuring ProxyDirContext
[EMAIL PROTECTED]
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploying class repositories to
work directory /usr/local/tomcat4.0.4/work/Agent8050/localhost/sfpsr2
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/activation.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/activation.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/classes12.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/classes12.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-beanutils.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-beanutils.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-collections.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-collections.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-dbcp-1.1.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-dbcp-1.1.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-digester.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-digester.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-fileupload.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-fileupload.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-lang.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-lang.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-logging.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-logging.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-logging1.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-logging1.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/commons-validator.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/commons-validator.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/jakarta-oro.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/jakarta-oro.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/log4j-1.2.8.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/log4j-1.2.8.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR /WEB-INF/lib/mail.jar
to /usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/mail.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/servlet.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/servlet.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/struts.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/struts.jar
 2004-03-22 15:18:09 WebappLoader[/sfpsr2]: Deploy JAR
/WEB-INF/lib/struts2.jar to
/usr/local/tomcat4.0.4/webapps/sfpsr2/WEB-INF/lib/struts2.jar
 2004-03-22 15:18:09 StandardManager[/sfpsr2]: Seeding random number
generator class java.security.SecureRandom
 2004-03-22 15:18:09 StandardManager[/sfpsr2]: Seeding of random number
generator has been completed
 2004-03-22 15:18:10 ContextConfig[/sfpsr2]: Added certificates - request
attribute Valve
 2004-03-22 15:18:10 Initializing application variables
 2004-03-22 15:18:11 StandardWrapper[/sfpsr2:default]: Loading container
servlet default
 2004-03-22 15:18:11 default: init
 2004-03-22 15:18:11 jsp: init
 2004-03-22 15:18:12 StandardWrapper[/sfpsr2:ssi]: Loading container servlet
ssi
 2004-03-22 15:18:12 ssi

Re: Configuration Help

2004-03-23 Thread Adrian Lanning
Hmm,

Do you have Tomcat set up to listen on port 80? (you shouldn't)

Can you get to your webapp correctly using localhost?  Try setting up a test
host in your server.xml file with name=www.example.com and then edit your
hosts file to point 127.0.0.1 to www.example.com.  Then try connecting to
http://www.example.com:8080/yourWebApp and report your findings.

Earlier you said:

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.


Do you mean that you've set defaultHost to your IP address?  Try setting
your engine's defaultHost and your host's name to the domain name:
dev.dynamichostings.com


Please post your server.xml file.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:10 AM
Subject: RE: Configuration Help


Thanks for the links below. I've been looking at anything I can find and as
far as I can tell, I have IIS configured to support Tomcat.

The following link serves the web app I'm trying to configure, but it only
serves it from the ip address and not the URL

http://66.80.144.156/dynamichostings

I'm trying to get it to work from this url: http://dev.dynamichostings.com

I'm almost 100% positive it has something to do with the server.xml file
because if my IIS wasn't configured correctly, the first url example
wouldn't work.

I've even tried to contact the support people at JBoss but they wouldn't
talk with me unless I purchased either a $5K or $10K support package

This shouldn't be this difficult to get working

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 7:30 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

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


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

Re: workers.properties and virtual hosts

2004-03-23 Thread Adrian Lanning
JK tut:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html

As staf pointed out you can use the same worker.  Use localhost.

Adrian

- Original Message - 
From: staf wagemakers [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:28 AM
Subject: Re: workers.properties and virtual hosts


 On Tue, Mar 23, 2004 at 02:01:34PM +0100, Michael Kastner wrote:
 
  I am trying to install tomcat5 with apache 1.3 using the mod_jk
connector.
 
  On my test system I've got several virtual hosts. Do I have to create a
  separate worker for each virtual host?
 
  E.g.:
 
  worker.list= worker1, worker2, worker3
 
  worker.worker1.type=ajp13
  worker.worker1.host=host1.linuxstation2
  worker.worker1.port=8009
 
  worker.worker2.type=ajp13
  worker.worker2.host=host2.linuxstation2
  worker.worker2.port=8009
 
  worker.worker3.type=ajp13
  worker.worker3.host=host3.linuxstation2
  worker.worker3.port=8009
 
 
  Any help is very much appreciated.
 

 Depends on what you mean by virtualhosts, if you have one tomcat
 server with several virtualnamehosts it's possible to do it with one ajp
 connector.

 http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html

 describes howto setup virtualhosts with jk2. The setup for jk1 is very
 similar.

 -- 
 Staf Wagemakers

 email: staf at patat.org
 homepage: http://staf.patat.org

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



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



Re: Configuration Help

2004-03-23 Thread Adrian Lanning
As I understand it, you should not be using the IP address in server.xml
except to limit the connector to a specific IP address if you don't want
Tomcat to answer requests for other IPs.

In production you can use localhost for a host and use your domain as an
alias.  Or you can get rid of localhost altogether and just set up your
domain as a host.

We need to set up a control so follow the steps I recommended in my last
email and post your results to the list.  Also, please post your server.xml
file.

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:42 AM
Subject: RE: Configuration Help


The server.xml file is using the default port settings (8080 and 8009) and
instead of localhost or 127.0.0.1, I'm using the server's ip address.

Even though this is a web server, should I have the server.xml file
configured to use localhost instead of the server's ip address?

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 8:43 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hmm,

Do you have Tomcat set up to listen on port 80? (you shouldn't)

Can you get to your webapp correctly using localhost?  Try setting up a test
host in your server.xml file with name=www.example.com and then edit your
hosts file to point 127.0.0.1 to www.example.com.  Then try connecting to
http://www.example.com:8080/yourWebApp and report your findings.

Earlier you said:

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.


Do you mean that you've set defaultHost to your IP address?  Try setting
your engine's defaultHost and your host's name to the domain name:
dev.dynamichostings.com


Please post your server.xml file.

Adrian


- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 9:10 AM
Subject: RE: Configuration Help


Thanks for the links below. I've been looking at anything I can find and as
far as I can tell, I have IIS configured to support Tomcat.

The following link serves the web app I'm trying to configure, but it only
serves it from the ip address and not the URL

http://66.80.144.156/dynamichostings

I'm trying to get it to work from this url: http://dev.dynamichostings.com

I'm almost 100% positive it has something to do with the server.xml file
because if my IIS wasn't configured correctly, the first url example
wouldn't work.

I've even tried to contact the support people at JBoss but they wouldn't
talk with me unless I purchased either a $5K or $10K support package

This shouldn't be this difficult to get working

-Dave

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 7:30 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hi Dave,
Did you ever solve this problem?

Actually, 400 error is malformed syntax. Basically doesn't tell us much in
this situation besides configuration screwed up.

I don't use IIS so don't know how to from first-hand experience.  Searching
turns up stuff on connecting using jk rather than jk2.  Have you tried
getting jk to work?

Have you looked at:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html

Also try:
http://www.onjava.com/pub/a/onjava/2002/12/18/tomcat.html

hth,
Adrian



- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 10:15 AM
Subject: RE: Configuration Help


Adrian,

The 400 error is indicating that the page has been moved, server might not
be available... blah, blah

This URL will display the web app I'm working with...
http://66.80.144.156/dynamichostings/
But if I try this URL I get the error
http://dev.dynamichostings.com

I think I'm close I just don't know what configuration change I need to make
at this point. I've been told that by mapping the isapi_redirector2.dll in
IIS it should work

There has to be someone else who is successfully using IIS and Tomcat 5 out
there

-Original Message-
From: Adrian Lanning [mailto:[EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:15 AM
To: Tomcat Users List
Subject: Re: Configuration Help


Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps

Re: Which Engine is Which

2004-03-23 Thread Adrian Lanning
Hi,
Let's define some terminology so we don't confuse ourselves.
Engine - when talking about Tomcat engine means engine as per tomcat's
configuration file.
Servlet - programs that process / handle requests.

The program (servlet) that processes jsps is a servlet just like any custom
servlet you write.

The only difference is that the servlet that handles jsps is defined for you
TOMCAT_HOME/conf/web.xml as:

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namefork/param-name
param-valuefalse/param-value
/init-param
init-param
param-namexpoweredBy/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

!-- The mapping for the JSP servlet --
servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jsp/url-pattern
/servlet-mapping

servlet-mapping
servlet-namejsp/servlet-name
url-pattern*.jspx/url-pattern
/servlet-mapping



For your own servlets you define your own web.xml file with your own
mappings and place it in the WEB-INF directory of your app.

Hope that clears it up.
Adrian


- Original Message - 
From: Schalk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 10:03 AM
Subject: RE: Which Engine is Which


Hi there



This is probably something I should know but, for clarification, is the
engine that processes jsp's different to the one that processes servlets?
Also what is the name of the engine that processes JSP's and, if different,
the name of the engine that processes servlets.



Thanks!



Kind Regards

Schalk Neethling

Web Developer.Designer.Programmer.President

Volume4.Development.Multimedia.Branding

emotionalize.conceptualize.visualize.realize

Tel: +27125468436

Fax: +27125468436

email:[EMAIL PROTECTED]

web: www.volume4.com



This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you.




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



Re: Configuration Help

2004-03-22 Thread Adrian Lanning
Hey Dave,

I'm a little fuzzy on my errors.  Is 400 from iis or tomcat?  Does tomcat
work with the urls in standalone mode?

Adrian

- Original Message - 
From: LILES, DAVID (CONTRACTOR) [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 22, 2004 9:17 AM
Subject: Configuration Help


For over a week I have been unable to get Tomcat 5 configured with IIS 5.

I know the Tomcat server is working because I can get to the management
console from the IP address:8080 and the two example web apps are working,
both from the IP address:8080/servlet-examle  and without the port...

I have created a web app instance which I can access from the IP
address:8080/webapp and IP address/webapp, but when I attempt to access it
from the URL I get a 400 error.

In the server.xml file the engine tag is configured to use the IP address
of the server and one host tag is set to the IP address. I have a second
host tag that is set to the URL I want to serve.

Can anyone help explain what I need to do in order to access the web app by
the URL?

In IIS I have configured the isapi_redirector2.dll at the root server level
and in the web app I'm trying to get working I created a virtual directory
named jakarta. I have made all the necessary registry entries required to
support the .dll.

Thanks,
Dave

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


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



Re: Java Mail Real Email

2004-03-19 Thread Adrian Lanning
http://java.sun.com/products/javamail/
javamail-1_3_1.zip - Filesize = 2,270,566 bytes.

You'll need activation.jar too. There's a link to it on the above page.

Adrian Lanning

- Original Message - 
From: Steve Gums [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 11:53 AM
Subject: RE: Java Mail Real Email


 Is there a good place to get these jars without pulling the whole dang
SDK.

 -Original Message-
 From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 9:27 AM
 To: Tomcat Users List
 Subject: RE: Java Mail Real Email

 I got a similar error when I migrated a working web app from one server to
 another. The problem resulted from an older version of the mail.jar on the
 server I moved the web app too.

 You might want to compare the mail.jar files between the two servers.

 -Dave

 -Original Message-
 From: QM [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 9:56 AM
 To: Tomcat Users List
 Subject: Re: Java Mail Real Email


 : Unable to complete :javax.mail.NoSuchProviderException: No provider for
 : Address type: rfc822

 The phrase completely functioning on another server is the tipoff --
 what's in the working server's {tomcat inst}/common/lib?  Anything
 JavaMail related?

 -QM

 -- 

 software  -- http://www.brandxdev.net
 tech news -- http://www.RoarNetworX.com


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


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



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



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



Re: Java Mail Real Email

2004-03-19 Thread Adrian Lanning
my pleasure although Dave Liles did the actual helping. :-)

Adrian

- Original Message - 
From: Steve Gums [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 12:34 PM
Subject: RE: Java Mail Real Email


 That did it.  Just needed a newer mail.jar and activation.jar

 Thanks for the help Adrian!

 -Original Message-
 From: Steve Gums [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 10:16 AM
 To: 'Tomcat Users List'
 Subject: RE: Java Mail Real Email

 Thanks much

 -Original Message-
 From: Adrian Lanning [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 10:14 AM
 To: Tomcat Users List
 Subject: Re: Java Mail Real Email

 http://java.sun.com/products/javamail/
 javamail-1_3_1.zip - Filesize = 2,270,566 bytes.

 You'll need activation.jar too. There's a link to it on the above page.

 Adrian Lanning

 - Original Message - 
 From: Steve Gums [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Friday, March 19, 2004 11:53 AM
 Subject: RE: Java Mail Real Email


  Is there a good place to get these jars without pulling the whole dang
 SDK.
 
  -Original Message-
  From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 19, 2004 9:27 AM
  To: Tomcat Users List
  Subject: RE: Java Mail Real Email
 
  I got a similar error when I migrated a working web app from one server
to
  another. The problem resulted from an older version of the mail.jar on
the
  server I moved the web app too.
 
  You might want to compare the mail.jar files between the two
servers.
 
  -Dave
 
  -Original Message-
  From: QM [mailto:[EMAIL PROTECTED]
  Sent: Friday, March 19, 2004 9:56 AM
  To: Tomcat Users List
  Subject: Re: Java Mail Real Email
 
 
  : Unable to complete :javax.mail.NoSuchProviderException: No provider
for
  : Address type: rfc822
 
  The phrase completely functioning on another server is the tipoff --
  what's in the working server's {tomcat inst}/common/lib?  Anything
  JavaMail related?
 
  -QM
 
  -- 
 
  software  -- http://www.brandxdev.net
  tech news -- http://www.RoarNetworX.com
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



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



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



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



Re: mod_jk or mod_jk2 for production

2004-03-19 Thread Adrian Lanning
Mike,
I haven't heard of anyone having stability issues with JK2 once they got it
configured correctly.  List, correct me if I'm wrong.

The only problem with JK2 2.0.2 that I know of (and one I found the hard
way) is that JkUriSet works globally within the httpd.conf file rather than
relative to the virtual host its in.  So you can't have one url mapping for
one virtual host point to one worker and the same url mapping for another
virtual host point to another worker.

To illustrate what I mean, in the following example, all *.htm requests will
go to tomcat:
VirtualHost 1 
Location /*.htm
JkUriSet worker ajp13:localhost:8009
/Location
/VirtualHost
VirtualHost 2 
Regular static apache stuff...  (*.htm requests should NOT be passed to
tomcat)
/VirtualHost


In this example, all *.jsp requests will go to the same port (im not sure if
it uses the first one it finds or the last one):
VirtualHost 1 
Location /*.jsp
JkUriSet worker ajp13:localhost:8009
/Location
/VirtualHost
VirtualHost 2 
Location /*.jsp
JkUriSet worker ajp13:localhost:8055
/Location
/VirtualHost

This doesn't affect the stability and isn't a problem for most people since
most people aren't using mass virtual hosting (ip virtual hosting).  At
least it hasn't come up on the list much.

The JkMount directive works correctly in this case (ie. relative to the
VirtualHost).

Question for the list, for those of you who've switched from JK to JK2, did
you see any performance benefits?

hth,
Adrian Lanning


- Original Message - 
From: Mike Millson [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, March 19, 2004 3:09 PM
Subject: mod_jk or mod_jk2 for production


 Is the statement in the link below on the Tomcat FAQ page regarding the
 stability of mod_jk vs mod_jk2 still valid? Is mod_jk2 still not stable
 enough for production environments, or is this info out of date?

 http://jakarta.apache.org/tomcat/faq/connectors.html#vs

 Mike


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



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



Re: Mod_jk.so on Compaq Tru64

2004-03-18 Thread Adrian Lanning
Never seen that before.

Did a quick grep (grep -R 'map_alloc' *) through the mod_jk source files for
map_alloc and it is found in
jk/native/common/jk_map.h and
jk/native/common/jk_map.c

The error is saying that it can't find the lib to execute the function.
Maybe you didn't build the common lib...?

hth,
Adrian Lanning


- Original Message - 
From: Sullivan, Patrick [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 2:05 PM
Subject: Mod_jk.so on Compaq Tru64


Does any one recognize these?

Built:
 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol map_alloc unresolved

Binary:
Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol __builtin_va_start


Thank you,

Patrick Sullivan
Centura Health

-Original Message-
From: Brian Beckman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:39 PM
To: Sullivan, Patrick
Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64


Patrick,

1 ) Yes, I have alphajava jawt.h   jni.hjvmdi.h  jvmpi.h 
in
$JAVA_HOME/include

2) I do have the classic dir in the LD_LIBRARY_PATH but the file is
actually libjvm.so, not libjvm.a

3) Java -verison gives:
java version 1.3.1
Java(TM) 2 Runtime Environment, Standard Edition
Fast VM (build 1.3.1-2, native threads, mixed mode, 01/16/2002-13:22)

4) When I echo LD_LIBRARY_PATH, I get:

/lib:/usr/lib:/prod/ccs/lib:/prod/gen/lib/shared:/sfwr01/cobol/lib:/usr/
opt/
java
131/jre/lib/alpha/classic:/usr/opt/java131/jre/lib/alpha

I tried the find command and it did not find anything.

Any other ideas?

Thanks!
Brian

-Original Message-
From: Patrick J. Sullivan [mailto:[EMAIL PROTECTED]
Sent: Monday, March 15, 2004 4:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64

Can you send your envvars file?

Goto $JAVA_HOME/include do you have jni.h and jvmXX.h (XX being place
holder for different flavors.) or just find $JAVA_HOME -name *.h

find the archive:  find $JAVA_HOME -name *vm*.a
on AIX with JDK 1.3.1 it is: /usr/java131/jre/bin/classic/libjvm.a

Is this path in your LIBPATH?

What vendor and version of JDK?

as for map_alloc sounds like /usr/lib or what ever HP uses is not in
your LIBPATH either.

find /usr/lib -exec grep -l map_alloc {} \; I believe it is defined in
/usr/lib/boot/unix which maybe a symbolic link to vendor specific file.

let me know

Brian Beckman wrote:

 For now, I'm using Apache 1.3.27, Tomcat 4.0.6, and the connector that
 came with the 4.0.6.

 I was able to build a mod_jk using apxs, but when I try to start
 apache, I
 get:

 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol map_alloc unresolved
 /usr/local/bin/apachectl start: httpd could not be started

 I found a pre-built mod_jk.so for Tru64 5.1 and when I use that, I get
 the following error:

 Syntax error on line 65 of /usr/local/stow/apache/etc/httpd.conf:
 Cannot load /usr/local/stow/apache/lib/mod_jk.so into server: dlopen:
 /usr/local/stow/apache/lib/mod_jk.so: symbol __builtin_va_start
 unresolved
 /usr/local/bin/apachectl start: httpd could not be started

 Thanks for your help.

 Brian

 -Original Message-
 From: Patrick J. Sullivan [mailto:[EMAIL PROTECTED]
 Sent: Monday, March 15, 2004 2:31 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [Lawson_SysAdmin] Mod_jk.so on Compaq Tru64

 What error messages are you getting?

 Which version Apache?
 Which version Tomcat?
 Which version Connector?


 With mod_jk I had to play with my share libraries, path and cc
 options. Let me know

 Brian Beckman wrote:
 
 
  Im trying to get Apache/Tomcat to work on Tru64 without much luck.
  Has anyone out there successfully built and loaded the mod_jk.so
  module on
  Tru64
  5.1?  If so, what c compiler, build command, and system libraries
  did you use?
 
  Thanks,
  Brian
 
  [Non-text portions of this message have been removed]
 


*
This communication is for the use of the intended recipient only.  It may
contain information that is privileged and confidential.  If you are not the
intended recipient of this communication, any disclosure, copying, further
distribution or use thereof is prohibited.  If you have received this
communication in error, please advise me by return e-mail or by telephone
and
delete/destroy it.

*

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


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



Re: JDBC problems with MySQL

2004-03-17 Thread Adrian Lanning
Abhay,

Back on 3/17/04 9:50AM, Steve says he got it to work...


I got this to work by either placing the context directly into the
server.xml file or placing the xml file into it's correct location in
/usr/local/tomcat/conf/Catalina/localhost/DBTest.xml

Not exactly sure the reason, but it is working now.

Steve


Check the archives...

Adrian Lanning

- Original Message - 
From: Kumar Abhay-CAK203C [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 1:01 PM
Subject: RE: JDBC problems with MySQL


 Dear Steve,

 I posted this problem around 3 months back and I am daily reading the
forum, hoping that one day somebody will give a solution.
 I will deeply appreciate you if u share the solution with me if u r able
to find.

 Good Luck

 Best Regards
 Abhay Kumar


 -Original Message-
 From: Steve Gums [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, March 16, 2004 11:57 AM
 To: [EMAIL PROTECTED]
 Subject: JDBC problems with MySQL


 Users

 I know there has been a bazillion messages about this.  I
searched the archives and couldn't find anything to solve my extremely
annoying issue.  It has to be something really simple but I just can't find
it.



 My System:

 Solaris 9

 Tomcat 5.0.19

 MySQL 4.0.18

 Connector J 3.0.11



 I have the connector J jar in the /usr/local/tomcat/common/lib dir.

 I have basically copied the HOW-TO located at.


http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
 to.html



 and my result is this.


 Results


 Foo Not Connected
 Bar -1



 I have tried everything I can think of.  I verified the database and the
user/password combo.  Works good.  I even created a simple Java app that
connects and performs queries, which worked.  That would indicate everything
is cool with the Connector J.  I have verified that the jdbc/TestDB is in
the context and it is.  As best I can tell ds (DataSource) is coming back
not null, but the call to getConnection is failing.  I created a little more
verbose web app and get the following message.

 org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: No suitable driver



 This has to be something simple, because this works fine on my old
machine. I know I am forgetting some small step that I did the first time
and failed to do again.  Trust me I have checked the configs about a million
times, and
 can't find any differences.   Any help would be appreciated.



 Sorry to be so vague here, but this is really simple. I don't know what
else to include for info.



 Steve Gums

 [EMAIL PROTECTED]




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



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



Re: apache 1.3 tomcat 5.0.19

2004-03-17 Thread Adrian Lanning
Nope,
you only need jk or jk2 if you are using another webserver as a front-end to
Tomcat.
Adrian Lanning

- Original Message - 
From: Galam [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 5:59 PM
Subject: RE: apache 1.3 tomcat 5.0.19


 Shapira,

 I have a question!

 If I use Tomcat5 standalone in production, do I still need to configure
the mod_jk ?  The mod_jk has been giving me too much troubles, and it would
be really great if it is not needed in standalone enviroment. Thanks!

 Galam.




 Shapira, Yoav [EMAIL PROTECTED] wrote:
 Hi,
 Tomcat 5 can be used standalone to serve static content including
 images, yes. The same is true for tomcat 3 and 4 as well. People are
 using tomcat in production without a front-end server to handle static
 content, yes. Is there a drop in performance? Probably yes, but it
 depends on the static content, the traffic your site gets, the hardware
 and software configuration, and a host of other variables: frequently
 the drop in performance is better than the additional maintenance and
 setup costs of a separate front-end.

 Yoav Shapira
 Millennium Research Informatics


 -Original Message-
 From: Emerson Cargnin [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 17, 2004 2:16 PM
 To: Tomcat Users List
 Subject: Re: apache 1.3 tomcat 5.0.19
 
 I have a complementary question, taht I know that i have being asked
 before, but didn't find any answer, it's related to my previous
 question:
 
 - Tomcat 5 can be used directly (in production) without apache??? For
 serving static pages and images??? I mean, there are anybody using it
 direct in production, without any drop in performance?
 
 Emerson Cargnin wrote:
  Hi all
 
  I'm migrating a tomcat 3.2.3 isntallation to version 5.
  When using 3.2.3, I used to use automatic mod_jk.conf-auto generation
  for use by apache. Does version 5 has the same feature? Or do I have
 to
  configure it by hand?? any how-to?? It's not mentioned in tomcat 5
 docs..
 
  I used mod_jk, is jk2 prefered There's no linux release for it
 and
  when trying to build as the readme says, the buildI doesn't work at
 all...
 
  I'm using suse 9 / apache 1.3 and tomcat 5.
 
 
 
 
 --
 Emerson Cargnin
 Analista de Sistemas
 Setor de Desenvolvimento de Sistemas - TRE-SC
 tel : (048) - 251-3700 - Ramal 3181
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged. This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else. If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender. Thank you.


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


 Do you Yahoo!?
 Yahoo! Mail - More reliable, more storage, less spam

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



Re: A plan to access files outside the context/Tomcat?

2004-03-17 Thread Adrian Lanning
Sounds like a workable solution.  Are you using apache or some other
front-end to Tomcat?  If so then you can use an alias to serve up the images
rather than serve them up manually with your servlet.  I've done it both
ways in content management systems I've made and letting apache do it saves
a class or two...

Actually you might be able to let Tomcat do it for you if you set up a
connector to listen on port 80.  I've never used Tomcat alone so don't have
any experience doing it that way.

Adrian Lanning

- Original Message - 
From: Parsons Technical Services [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 6:30 PM
Subject: A plan to access files outside the context/Tomcat?


 I have a need to place and get, image files, to and from a directory
outside
 of the context and outside of Tomcat.

 My plan is this:

 Have an upload page to allow user to select local file on client and
upload
 to server. This is the same tactic as the manager is using with war files.

 The folder will have rights set to allow read/write by Tomcat user.

 This part, I think, will be staight forward. OK so far??

 Next to retrieve the image and serve it back to the client is a little
more
 involved.

 The plan:

 Servlet to accept all request for the /context/pics/* .

 Servlet reads file from directory and writes it out to the Servlet output
 stream.

 Am I nuts or is this a feasible plan?

 Just need to know if I am going in the right direction and if anyone has
any
 code snippets of the servlet writes.

 As for the file I/O I have that covered I think.

 Any/all comments welcome.




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



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



Re: how to use multiple jk2 connectors?

2004-03-17 Thread Adrian Lanning
Hi Joseph,

I had the same problem a while ago and never solved it. The root cause is
that for whatever reason the Location-JkUriSet combination acts globally to
the httpd.conf file rather than relative to the virtual host.  I wasn't sure
if the problem was with JkUriSet or with apache's Location directive.  It
sounds like it used to work for you with JkMount so the problem must be with
JkUriSet...

 Side Note 
List Users,
Am I correct in assuming the problem lies with JkUriSet?  Has anybody gotten
this to work?
 

I had to work around this by explicitly defining mappings in
workers2.properties.  This, of course, blows the whole concept of mass
virtual hosting out of the water since you have to manually add domains to
the workers2 file...

Does jk work correctly in this sense, where mappings are relative to the
virtual host?  If so, i'm switching back...

Adrian Lanning


- Original Message - 
From: Joseph Shraibman [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 1:49 AM
Subject: how to use multiple jk2 connectors?


 I have multiple ip based virtual hosts, so in tomcat I configured three
 seperate engines with connectors on different ports, and in the apache
 VirtualHost I JkMount the worker that I configured in
 worker.properties to connect on a specific port.  This works fine for
 mod_jk, but when I try mod_jk2 it insistes on using the default host of
 the engine that has the connector listening on port 8009.

 This is how I configure jk2:
 Location /*.jsp
  JkUriSet worker ajp13:localhost:8019
 /Location

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



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



RE: Virtual Hosting with Tomcat 4.1, Apache 2.0, and mod_jk2

2004-03-16 Thread Adrian Lanning
Hi James,

You actually can use JkUriSet in httpd.conf file.
For example, to map all .jsp files to tomcat,
   Location /*.jsp
   JkUriSet worker ajp13:localhost:8009
   /Location
This is a global mapping.

Check
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html
for a more in-depth example.
hth,
Adrian Lanning

From: Montz, James C. (James Tower) [EMAIL PROTECTED]
Reply-To: Tomcat Users List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Virtual Hosting with Tomcat 4.1, Apache 2.0, and mod_jk2
Date: Tue, 16 Mar 2004 09:59:38 -0600
Is there any way to specify context mappings in the httpd.conf file?
Something similar to JkUriSet?
I have successfully mapped *.jsp to my mod_jk2 worker, but I'm having an
issues mapping virtual hosts with the correct Tomcat context?
Using uri in the workers2.properties will prove cumbersome as I have many
virtual hosts, with many more ServerAliases.
Recommendations on how to best handle a single Apache 2.0./Tomcat 4.1 
Server
instance doing a large amount of virtual hosting for several sites, and
hostnames?

__
James C. Montz   RHCE
Hosting Services Engineer
James Tower
http://www.jamestower.com http://www.jamestower.com
_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


Re: Sporadic connection loss between Tomcat and Apache though mod_jk

2004-03-16 Thread Adrian Lanning
I'm no expert in this by any means so here's some questions that might help
debugging your problem:

First, is tomcat actually restarting?  catalina.out logs are clean?

If tomcat's not restarting then is jk using some lib that was changed
between rh8 and enterprise?  Could try recompiling jk on the new system.
(course you might have already done that...)

could some other program be trying to use the port jk uses?  try changing
the port and retesting...

anything unusual about the times when it flakes out?  heavy load, etc...

i'd check jk_connect.c and see if you can find out more info on what caused
the error (61).  if it just can't open the socket (as its reporting) then is
it timing out or just getting refused?

Could a firewall difference in the new system mess something up?

i've reached the extent of my limited knowledge in this area. :-)
hth,
Adrian Lanning

- Original Message - 
From: Clute, Andrew [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:39 PM
Subject: RE: Sporadic connection loss between Tomcat and Apache though
mod_jk


I should also mention we are on Apache 2.0.47

-Andrew



-Original Message-
From: Clute, Andrew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 4:24 PM
To: [EMAIL PROTECTED]
Subject: Sporadic connection loss between Tomcat and Apache though
mod_jk

Ever since upgrading the box that our Tomcat server (actually
Jboss/Tomcat) resides on from RedHat 8.0 to RedHat Enterprise ES 3.0, we
will get very sporadic 500 errors on our JSP pages. When we get one of
the errors, if we refresh it right away, the page come back fine.

Mod_jk is set up, to the best of knowledge, correctly, as it worked
flawlessly for 12 months in production before we changed our production
java box (the apache box stayed the same -- nothing about it changed,
not even configuration files).

Pertinent information:

Uname -a = Linux WWW_JBOSS 2.4.21-9.0.1.ELsmp #1 SMP Mon Feb 9 22:26:51
EST 2004 i686 i686 i386 GNU/Linux

Java version:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1) Classic
VM (build 1.4.1, J2RE 1.4.1 IBM build cxia321411-20030930 (JIT
enabled: jitc))

Jboss3.2.3 with Tomcat 4.1.29

Here is the output from the mod_jk.log file:

[Tue Mar 16 13:34:30 2004]  [jk_connect.c (203)]: jk_open_socket,
connect() failed errno = 61
[Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c (676)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong
port. Failed errno = 61 [Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c
(955)]: Error connecting to the Tomcat process.
[Tue Mar 16 13:34:30 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=1 [Tue Mar 16 13:34:32 2004]
[jk_connect.c (203)]: jk_open_socket,
connect() failed errno = 61
[Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c (676)]: Error connecting to
tomcat. Tomcat is probably not started or is listenning on the wrong
port. Failed errno = 61 [Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c
(955)]: Error connecting to the Tomcat process.
[Tue Mar 16 13:34:32 2004]  [jk_ajp_common.c (1309)]: sending request to
tomcat failed in send loop. err=2 [Tue Mar 16 13:34:32 2004]
[jk_ajp_common.c (1318)]: Error connecting to tomcat. Tomcat is probably
not started or is listening on the wrong port. Failed errno = 61

Thanks for any help!

-Andrew





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


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



Re: web.xml Welcome -file and for SSL

2004-03-16 Thread Adrian Lanning

- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:16 PM
Subject: Re: web.xml Welcome -file and for SSL






 Hi Forte,
 I am also having similar type of problem. When the user types
 http://www.mysite.com it should first go to the default .html page (that
is
 using 80 port) that I have set in the welcome-file-list in web.xml file.
 Its working fine. But once the user logs in from the home page, he should
 then be redirected to https://www.mysite.com/Welcome.jsp (using 443 port).
 See the port difference. I do not know where to set the redirection. or
 should I hard code this settings in my .jsp file itself?

 Thank you,
 Best Regards,
 Uma




  Forte, Graham
  [EMAIL PROTECTED]
  .com  To

  03/16/2004 06:50  'Tomcat Users List'
  PM[EMAIL PROTECTED]
 cc

  Please respond to
Tomcat Users
List
  [EMAIL PROTECTED]
   rta.apache.org  Subject
web.xml  Welcome -file and for SSL










 Hello,
  I am wondering if it is possible to specify a Welcome-file
for
 an
 https request. If I am using port 443 how can I configure Tomcat 4.1 so
 that
 when the user types in https://myIPAddress  or https://myDomainName they
 will be directed to https://myIPAddress/myFirstPage.jsp.
 Thanks, Graham

 PS I have the web.xml Welcome-file setup with:
 welcome-file-list
  welcome-filemyFirstPage.jsp/welcome-file
 /welcome-file-list

 Will this accomplish what I need to accomplish, or do I need to add
 something else.
 I cant test this out right now because I have all ports blocked except
 8443.
 Thanks!!

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





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



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



Re: web.xml Welcome -file and for SSL

2004-03-16 Thread Adrian Lanning
Uma,
Hard coding it is the simplest and fastest way to do what you want.  With
HTTP the actual form itself doesn't need to be https, just the action
target.  hotmail.com is a good example of this.

If you have content inside the webapp that you need to make sure is accessed
securely you can either check the protocol manually when you need it (say
from a base class which you extend) or you can make a filter that checks the
protocol.  Matt Raible has an example app that uses the filter method called
appfuse. You can find it here:
http://raibledesigns.com/wiki/Wiki.jsp?page=AppFuse

Graham,
It looks like your setup is correct, you just use the welcome file.  But you
have to have tomcat listen on port 443 rather than 8443.  It sounded in your
original post like Tomcat was just listening on 8443...

hth,
Adrian


- Original Message - 
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 16, 2004 10:16 PM
Subject: Re: web.xml Welcome -file and for SSL






 Hi Forte,
 I am also having similar type of problem. When the user types
 http://www.mysite.com it should first go to the default .html page (that
is
 using 80 port) that I have set in the welcome-file-list in web.xml file.
 Its working fine. But once the user logs in from the home page, he should
 then be redirected to https://www.mysite.com/Welcome.jsp (using 443 port).
 See the port difference. I do not know where to set the redirection. or
 should I hard code this settings in my .jsp file itself?

 Thank you,
 Best Regards,
 Uma




  Forte, Graham
  [EMAIL PROTECTED]
  .com  To

  03/16/2004 06:50  'Tomcat Users List'
  PM[EMAIL PROTECTED]
 cc

  Please respond to
Tomcat Users
List
  [EMAIL PROTECTED]
   rta.apache.org  Subject
web.xml  Welcome -file and for SSL










 Hello,
  I am wondering if it is possible to specify a Welcome-file
for
 an
 https request. If I am using port 443 how can I configure Tomcat 4.1 so
 that
 when the user types in https://myIPAddress  or https://myDomainName they
 will be directed to https://myIPAddress/myFirstPage.jsp.
 Thanks, Graham

 PS I have the web.xml Welcome-file setup with:
 welcome-file-list
  welcome-filemyFirstPage.jsp/welcome-file
 /welcome-file-list

 Will this accomplish what I need to accomplish, or do I need to add
 something else.
 I cant test this out right now because I have all ports blocked except
 8443.
 Thanks!!

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





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



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



Re: several virtual hosts -- single application

2004-03-15 Thread Adrian Lanning
Hi James,

On Linux, I've accomplished this using the following configuration:

+ snip from server.xml on linux +
Host name=domain1 debug=0 appBase=webapps/app1
unpackWARs=true autoDeploy=true
/Host

Host name=domain2 debug=0 appBase=webapps/app2
unpackWARs=true autoDeploy=true
/Host
+ snip from server.xml on linux +

On Windows, try this:

+ snip from server.xml on windows +
  Host name=domain1 debug=0 appBase=webapps
 unpackWARs=true autoDeploy=true
Context path= docBase=/app1 debug=1/
  /Host
  Host name=domain2 debug=0 appBase=webapps
 unpackWARs=true autoDeploy=true
Context path= docBase=/app2 debug=1/
  /Host
+ snip from server.xml on windows +

I don't know why it acts differently on windows and linux...
Also, I've noticed that the windows setup seems to create two instances of
each app when viewed in the manager.  One as / and one as app1 or app2
(depending on which domain you log into).  So this should get you started
but I wouldn't use the windows setup for production.  Linux you should be
good to go.

HTH,
Adrian Lanning


- Original Message - 
From: James Agnew [EMAIL PROTECTED]
To: tomcat list [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 5:24 AM
Subject: several virtual hosts -- single application


 Hello

 Is it possible to have several virtual hosts point to different folders
 within the same context under tomcat 5 standalone webserver?

 Host name=domain1.com debug=0 appBase=webapps
 Context path= docBase=domain1 debug=0 reloadable=true/
 /Host

 Host name=domain2.com debug=0 appBase=webapps
 Context path= docBase=domain2 debug=0 reloadable=true/
 /Host

 http://domain1.com -- myapps/domain1
 http://domain2.com -- myapps/domain2

 so that one application handles all the requests? I'm running Cold Fusion
as
 the application and I need it to handle request for virtual hosts within
its
 own context i.e. domain1 and domain2.

 I can achieve this easily with VirtualHost directive in Apache, but
can't
 get it to work under Tomcat standalone. Is it possible?

 Any help much appreciated.

 James


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



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



Re: Need example configuration for Apache/Tomcat/JK2 and multiple virtual hosts

2004-03-15 Thread Adrian Lanning
Hi Jeremy,

Have you verified that the apps work as expected when not using load
balancing?  Then we know where the problem is...

I don't know of any examples of loadbalancing with jk2.  If you get this to
work you can write a tut!

Here's a link to an example using jk1.
http://raibledesigns.com/tomcat/

If that doesn't help here's all the other links I've found for using jk2...
http://cymulacrum.net/writings/tomcat5/book1.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk2/vhosthowto.html
http://www.linuxjava.net/howto/webapp/
http://johnturner.com/howto/apache2-tomcat4127-jk-rh9-howto.html
http://www.thinlizard.com/lizard/modjk2.html
http://jakarta.apache.org/tomcat/faq/connectors.html

btw, how are you doing the forwarding in apache's httpd.conf file?  Using
the Location directive? Or are you setting them in worker2.properties?

hth,
Adrian Lanning


- Original Message - 
From: Jeremy Nix [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 9:10 AM
Subject: Need example configuration for Apache/Tomcat/JK2 and multiple
virtual hosts


I have a need to have Apache and Tomcat both handle requests for
multiple IPs (hosts).  I've initially set up a httpd.conf that defines 2
virtual hosts A and B.  Both use JSPs/Servlets, so they both have
references to JK2.  I've kept the JK2 configuration simple and used
localhost:8009 for both hosts.  On the tomcat side, I have 1 engine with
2 separate hosts listening on their respective IP's.  I've defined 3
connectors all running on the default address (localhost): NON-SSL, SSL
and AJP/JK2.  I also have this same configuration on 2 separate boxes
and they are both being load-balanced through a local-redirector.

This configuration seems to work as expected when I reference the
defaultHost in tomcat (virtual host A), but when I reference a page
hosted by virtual host B, I seem get unexpected errors (sometimes
recursive in nature).

So, has anybody experienced this?  Does anybody have a sample
configuration (load balancing with multiple virtual hosts) that I can
mimic?


_
Jeremy Nix
Southwest Financial Services, LTD.
[EMAIL PROTECTED]
(513) 621-6699 ext.1158


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


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



Re: help needed building JK2 connector

2004-03-15 Thread Adrian Lanning
Hi Matt,
I have built JK2 successfully several times on Redhat 9 with Tomcat 5 and
Apache 2.0.48.  The problem I had with the default apache installed on rh
9.0 was that mine didn't have the apxs program or maybe it was some missing
libraries.. In any case I had to build apache 2.0.48 from src first before I
could get it to work.

I used the tutorial by Pascal Chong (thanks Pascal!):
http://cymulacrum.net/writings/tomcat5/book1.html

Here's another resource for building jk2:
http://www.thinlizard.com/lizard/modjk2.html

hth,
Adrian Lanning

- Original Message - 
From: Dale, Matt [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, March 15, 2004 3:40 PM
Subject: help needed building JK2 connector


Hi,

I have Redhat 9 with Tomcat 5 installed and is working fine.

Apache 2.0.40 is installed by default and i'd rather stick with that because
it is integrated with a nifty configuration tool.

I'd like to link apache and tomcat with the JK2 connector which I have no
problems with. As far as I can tell there is no binary download for linux so
I have to build it.

The questions I have are.

Is there any documentation on building the JK2? Particularly the command
line parameters

As it is the default RPM install of tomcat there doesnt seem a sensible
Apache2 home that needs to be set for the build, is there something I should
set this to?

If this cant work would I be able to compile using apache 2.0.48 and use the
library with apache 2.0.40?


Any other advice on building the connector?

Thanks
Matt







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

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



Passing init params to a listener?

2004-03-14 Thread Adrian Beech
G'day all,

Can someone please advise how to pass init params to a listener?  For
example, in my web.xml file I have the following listener currently defined
as:-

  listener
listener-classczone.db.InitConnectionPool/listener-class
  /listener

At the moment all parameters are hard coded in the listener.  If I want to
extend the flexibility of the code by adding init parameters to the listener
definition do I merely do this:-

  listener
listener-classczone.db.InitConnectionPool/listener-class

init-param
  param-namejdbcConnectionString/param-name
  param-value.../param-value
/init-param
  /listener

If this is correct then what Java code is required in the
contextInitialized(...) method to pull the init parameter name and value so
the listener can use it?

I really don't have a clue what I'm doing so some guideance on this matter
would be greatly appreciated!

Thanks if you can help.

AB



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



RE: Passing init params to a listener?

2004-03-14 Thread Adrian Beech
G'day,

I assume from this that init parameters can only be accessed by a listener
if they have been declared globally within the applications context and not
from within the scope of the listener itself?  

Hm

AB


-Original Message-
From: Frank Burns [mailto:[EMAIL PROTECTED] 
Sent: Monday, 15 March 2004 12:30 AM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Passing init params to a listener?


For each parameter you need your listener to read, place name/value pairs in
your web.xml. Here's an example for two parameters (mySQLServerName and
mySQLPort):

 context-param
  param-name
   mySQLServerName
  /param-name
  param-value
   localhost
  /param-value
 /context-param

 context-param
  param-name
   mySQLPort
  /param-name
  param-value
   3306
  /param-value
 /context-param

Then, in your listener class, read them like this:

String serverName = application.getInitParameter(mySQLServerName);
String mySQLPort = application.getInitParameter(mySQLPort);


- Original Message - 
From: Adrian Beech [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 2:07 PM
Subject: Passing init params to a listener?


G'day all,

Can someone please advise how to pass init params to a listener?  For
example, in my web.xml file I have the following listener currently defined
as:-

  listener
listener-classczone.db.InitConnectionPool/listener-class
  /listener

At the moment all parameters are hard coded in the listener.  If I want to
extend the flexibility of the code by adding init parameters to the listener
definition do I merely do this:-

  listener
listener-classczone.db.InitConnectionPool/listener-class

init-param
  param-namejdbcConnectionString/param-name
  param-value.../param-value
/init-param
  /listener

If this is correct then what Java code is required in the
contextInitialized(...) method to pull the init parameter name and value so
the listener can use it?

I really don't have a clue what I'm doing so some guideance on this matter
would be greatly appreciated!

Thanks if you can help.

AB



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


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




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



JK2 VirtualHost-relative Location URI mapping

2004-03-14 Thread Adrian Lanning
Hi.
(B
(BDoes anyone know how to get Locations in httpd.conf to be relative to the
(BVirtualHost rather than global?
(B
(BI can get JK2 working properly by explicitly putting domains in my
(Bworkers2.properties file but I'd prefer using mass virtual hosting with jk2
(Band avoid having to add domains to apache (requiring a restart) whenever I
(Bget a new dynamic-website client.
(B
(BThe problem is that when I use the Location directive to map uri's (say
(B"/*.htm") to tomcat, that Location maps ALL "/*.htm" requests even though I
(Bput the Location inside a specific VirtualHost.  This wouldn't be a problem
(Bif all I had on the server were dynamic sites but I have static sites on the
(Bserver as well.
(B
(BAll tomcat app sites are on one IP while static sites are on other IPs
(B(that's how I'm doing mass virtual hosting).
(B
(BI've tried the following configuration
(B
(B+---start snip from httpd.conf---+
(B# this vhost is default for IP1.  All dynamic content sites use IP1.
(BVirtualHost IP1:80
(B...
(BLocation "/*.htm"
(BJkUriSet worker ajp13:localhost:8009
(B/Location
(B/VirtualHost
(B
(B# this vhost is default for IP2. All static content sites use IP2.
(BVirtualHost IP2:80
(B... regular static site stuff
(B/VirtualHost
(B+---end snip from httpd.conf---+
(B
(BWhat ends up happening is that ALL *.htm pages get sent to Tomcat regardless
(Bof what IP the request comes in on.
(B
(BAm I doing something wrong?  Has anyone done this using JK (1) in case JK2
(Bdoesn't support this?  Is this actually a limitation of Apache rather than
(BJK?
(B
(BServer Stats:
(B  RedHat 9.0
(B  Tomcat 5.0.19 - binary distribution
(B  JK2 2.0.2 - compiled from source.
(B  Apache 2.0.48  - compiled apache from source with
(B mod_ssl. Also use php and openssl in
(B case that makes a difference...
(B
(BThanks,
(BAdrian Lanning
(B
(B
(B-
(BTo unsubscribe, e-mail: [EMAIL PROTECTED]
(BFor additional commands, e-mail: [EMAIL PROTECTED]

Re: Why do I need to restart my server

2004-03-10 Thread Adrian Kristiawan






Hi, 

I'm having the same problem, I want to ask which file should I edit according to the changes below?

Thanks All. 

---Original Message---


From: Tomcat Users List
Date: 03/10/04 19:41:47
To: Tomcat Users List
Subject: Re: Why do I need to restart my server

This works with most except for oracle which uses select 1 from dual

parameter
namevalidationQuery/name
valueselect 1/value
/parameter


On Wed, 10 Mar 2004 [EMAIL PROTECTED] wrote:

 Date: Wed, 10 Mar 2004 16:49:21 +0530
 From: [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Why do I need to restart my server





 Hi,
 Every time my database server connection goes down, I need to restart my
 Tomcat 5.0.19 to re-establish the connection. Why is this so? Is this a
 bug?


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









 IncrediMail - Email has finally evolved - Click Here

Re: NT Service terminates

2004-03-08 Thread Adrian Kristiawan






I have a similiarproblem with you, I amusing Tomcat 4.1.18, but currently I'm not running it as a Windows Service on Windows 2000 Server, instead I start the Tomcat service byclicking the Start Tomcatshortcut in the windows desktop.
Whenever there is a communication link error or the communication is downbetween the client and the server where Tomcat resides, the Tomcat service just stops by itself. 

I thought the solution to my problem was to start the Tomcat as a windows service,but you stated otherwise, now I'm confused on how to fix my problem. 

Is it also true that if the load is too big, the Tomcat service will automatically stop by itself?

Can anyone help us on this matter?

Thanks. 

---Original Message---


From: Tomcat Users List
Date: 03/08/04 17:31:40
To: Tomcat
Subject: NT Service terminates

I have Tomcat 4.1.24 running as Windows Service on Windows 2000 Server- hosting a number of applications.I currently have it running

When I run a simple load test using Microsoft Stress Tester - as I increase the load I can repeatedly force the Window Service to terminate.I'm only running with a load of 100 users.

When I run Tomcat from the command-line as an application and I repeat the test - Tomcat runs fine - performance is fine.No problems.

So what is it about running Tomcat as a service that makes it so easy to bring down?I'm tempted to blame the OS - but that doesn't really solve the problem - or explain what the difference is.

Has anyone else observed this?

Is it possible to get Tomcat to start as an application - on start-up i.e. as if it were a service - but running as an application.Sorry if that's a meaningless question.


-
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now








 IncrediMail - Email has finally evolved - Click Here

Where is the source code that processes the server.xml file?

2004-02-21 Thread Adrian Beech
G'day all,

Can someone please tell me where I might find the Java code in the Tomcat
5.0 source tree which is responsible for processing the server.xml file?
I'm particularly looking for the code that is employed to handle the
resource ... elements in the server.xml file.

I would greatly appreciate any help in finding the code.

Thanks.
AB



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



Running a Java Application under Tomcat

2004-02-17 Thread Adrian Klingel
I have a Java application that polls a directory for XML files.  This
application is run from a main method in one of my classes.  I can run it
from the command line just fine, but I want to deploy it as a web
application.

Right now, there are no user interface components, but I will be adding
those, so it makes sense to deploy it under Tomcat.  I also want to take
advantage of connection pooling and JNDI already present in Tomcat.

I don't know how to make Tomcat run my main method, whether it is a
setting in the web.xml file, or what.

Any help that anyone can offer is deeply appreciated.  I understand that
this is probably a rookie Tomcat question, but I have been unable to find an
answer after scouring the internet.

Thank you very much,
Adrian Klingel



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



How to configure Tomcat 5.0+ behind a hardware accelerator?

2004-02-10 Thread Adrian Klingel
Can anyone supply me with a link to a document that contains information on
how to configure Tomcat 5.0+ to sit behind an SSL accelerator machine?  I've
been unable to find specifics on the internet, only the fact that people
have done it.

Thanks very much,
Adrian Klingel




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



Terminating or suspending an application if a on start up servlet throws an exception?

2004-01-18 Thread Adrian Beech
G'day,

Is it possible to have Tomcat 4.1.x terminate or suspend access to an
application if a servlet which is fired at start up throws an exception?
For example, we have two servlets which are loaded on start up.  The
first one sets up the database connection pool and the second one does
various other application initialisation type actions.  If either one
throws an exception then I'd like the application to be unavailable.

Can this be done?  If so then how?

AB



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



New MMBase Installation HOWTO

2003-12-15 Thread Adrian Offerman
Hi everyone,

I compiled an MMBase Installation HOWTO:
   http://www.offerman.net/MMBase-Installation-HOWTO/
Any feedback is welcome.
I'm not a regular subscriber to this list,
so please reply to mmbase-at-offerman-dot-net.
Best,
   Adrian Offerman
Abstract

This document describes the installation of the MMBase content
management system on a Red Hat Linux distribution, using the Tomcat
application server, and integrating it with MySQL and Apache.
Table of Contents:
   Introduction
   Installation
   Installing Java
   Installing Tomcat
   Replacing Tomcat's default JSP compiler Jasper with IBM's Jikes compiler
   Installing ImageMagick
   Installing MMBase
   Connecting MMBase to MySQL using MySQL Connector/J
   Configuring initial MMBase settings
   Running MMBase
   Connecting Apache and Tomcat using mod_jk2
   Installing an Apache reverse proxy as a front-end to your MMBase server
   Installing more MMBase servers under the same Tomcat server
   Acknowledgements
   Contributers
   Revision history
   Disclaimer
   Copyright
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Setting up a data source resource reference using a JNDI property file

2003-11-12 Thread Adrian Beech
G'day folks,
 
I was wondering if it is possible to set up a data source resource
reference using a JNDI property file?  If this is possible then does
anyone have a sample sort of file that will show how to set up a
connection pool to an Oracle DB?  
 
I have been successful thus far whilst developing with setting up the
connection pool using the required tags elements in my local dev
server.xml file but... sigh,  alas I do not have access to the
production platforms server.xml file to implement the necessary do
dads... don't ask me why the boffins see fit to restrict this sort of
thing here... it's a damn mystery :(  So I'm sort of hand tied for the
time being until some one here can give me a nod or two in the right
direction!
 
BTW, I am assuming that the JNDI property file can be app independant?
 
Any help in this matter will be greatly appreciated!
 
AB
[EMAIL PROTECTED]
 


Has there been a stable (non beta) rlease of Tomcat 5 yet?

2003-10-29 Thread Adrian Beech
G'day folks,

Well the subject line really says it all!  Just wondering if there has
been a Tomcat 5.0 release yet?  So far I've only spotted 5.0.12 beta
mentioned on the Apache (Jakarta section) web site.

AB



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



Blowing away objects that have been stored in the session context

2003-10-05 Thread Adrian Beech
G'day all,

Does Tomcat release all the resources used by an object if the object
has been stored in the session context and a call to
session.removeAttribute(objName) is made?  I'd like to blow away
several beans that are used throughout the processing of a transaction
once the confirmation page is called.

At this stage the only two ways I can think of doing this is to call
session.removeAttribute(...) or retrieve the object from the session
context and then assigning null to it, i.e. myObj = (MyObj)
session.getAttribute(myObjName); myObj = null;.

Can someone please shed some light on what is best?  Or are these two
possible ways totally off the track?

Thanks if you can help.

AB



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



Tomcat version 3 certificates?

2003-09-19 Thread Adrian Beech
G'day all,

Earlier today we were advised by a bod from another section in our
organisation that there is a known compatibility issue with Tomcat and
version 3 certificates.  Apparently he had been advised of this from
someone at Verisign.  

Does such an issue really exist and if so is it solely a Tomcat issue or
is it a result of something not quite working correctly in a particular
JDK version?

I find it a bit hard to believe that this claim is true.  However as I'm
no expert in the area I thought I'd pose the question before dismissing
it out of hand.  If such issues do exist I'd like to know where to find
further information relating to the situation, scenario and/or
workarounds.

Thanks if you can shed some light on this one!

AB



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



Tomcat 3.2.3 - IIS Problem

2003-08-14 Thread adrian tindeche
Hi,

We have an web application (on our Intranet) using Java Servlets. The web 
server is on a Windows NT Server machine, with IIS (Version 4.0, Build 1 
381, SP6) and Tomcat 3.2.3 integrated (JDK 1.3.1 installed).

The application worked fine untill a Microsoft patch (see 
http://www.microsoft.com/technet/treeview/?url=/technet/security/bulletin/MS03-026.asp) 
has been installed.

Now, nobody can work with the application. HTTP 404 error is returned when 
trying to access the application's link.
On the web server all the necessary settings are OK (registry settings, the 
jakarta vitual directory in IIS, isapi_redirect filter shows a green 
up-pointing).

On the web server, running the examples in 
http://localhost:8080/examples/jsp/index.html is working, also running the 
first servlet of the application is working too (wich is a loggin web page 
generated from a servlet), but the starting with this (for the next pages), 
we get the following message:
HTTP 405
405 Method Not Allowed
The method specified in the RequestLine is not allowed for the resource 
identified by the request. Please ensure that you have the proper MIME type 
set up for the resource you are requesting.
Please contact the server's administrator if the problem persists.

Any help to make the application working is highly appreciated.

Best Regards,
Adrian Tindeche
Software Eng.
Bucharest, Romania
_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

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


JSP seems to be executing twice and we are getting duplicate records in our database

2003-08-04 Thread Adrian Beech
Hi folks,

We have a weird problem where a JSP seems to be executing twice and we are
getting duplicate records in our database.  The data is coming from a HTML
form and upon submit a subsequent JSP page is called that performs the SQL
insert, etc.  We are also getting duplicate log messages so our initial
conclusion is that it's a Tomcat related issue.

We have tested this with Tomcat 3.3.1, J2SE 1.3.1 and from the client side
using both IE 5.5 and 6.0 and it happens intermittently.

At this stage we have absolutely no idea of what is going on.  Alas I didn't
write the code so I'm not up to speed with its structure, flow or
functionality.

I've searched the list archive and there appears to be several references to
similar problems.  However I am unable to find any real answer to what might
be causing this problem.

Hoping someone out yonder can help.

AB



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



RE: JSP seems to be executing twice and we are getting duplicaterecords in our database

2003-08-04 Thread Adrian Beech
Hi Bill,

Would I be right in assuming that you're inferring  a user is submitting the
form multiple times by clicking the submit button/link more than once?  Or
are you perhaps suggesting the browser is sending multiple requests without
user intervention to the server hence the reason why the responding JSP is
processing duplicate requests to insert the data twice?

I understand your suggestions and points.  I don't however understand why
the problem is occuring as in our case the additional execution of the JSP
doesn't appear to be initiated by the user -- i.e. multiple clicks on a
submit button, etc.  I've triggered the submit using keyboard control which
should initiate only one instance of the form data being sent to the server
and the problem still occurs.

It also seems a bit kludgy to first determine if a session ID associated
with a specific record already exists prior to inserting a new row.

AB


-Original Message-
From: Bill Lunnon [mailto:[EMAIL PROTECTED] 
Sent: Monday, 4 August 2003 9:27 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: RE: JSP seems to be executing twice and we are getting duplicate
records in our database


Adrian,

If you do not want anothe rows created every time the page is submitted,
then you are going to have to implement something to stop this. TOMCAT will
not do this for you.

Without knowing the requirements for the form, stopping multiple rows being
generated could be as simple as:
- Assign a session to the user (clients browser).
- When the form is submitted, capture the sessionId in the database with the
record.
- If there is no row with the sessionId in the database, create a new record
with an insert. If there is a existing session, use an update to modify the
record.


Hope this helps

Bill

-Original Message-
From: Adrian Beech [mailto:[EMAIL PROTECTED]
Sent: Monday, 4 August 2003 8:45 PM
To: [EMAIL PROTECTED]
Subject: JSP seems to be executing twice and we are getting duplicate
records in our database


Hi folks,

We have a weird problem where a JSP seems to be executing twice and we are
getting duplicate records in our database.  The data is coming from a HTML
form and upon submit a subsequent JSP page is called that performs the SQL
insert, etc.  We are also getting duplicate log messages so our initial
conclusion is that it's a Tomcat related issue.

We have tested this with Tomcat 3.3.1, J2SE 1.3.1 and from the client side
using both IE 5.5 and 6.0 and it happens intermittently.

At this stage we have absolutely no idea of what is going on.  Alas I didn't
write the code so I'm not up to speed with its structure, flow or
functionality.

I've searched the list archive and there appears to be several references to
similar problems.  However I am unable to find any real answer to what might
be causing this problem.

Hoping someone out yonder can help.

AB



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



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




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



RE: Servlets JSPs log to different files

2003-08-01 Thread Adrian Beech
G'day,

Can anyone expand on this further and explain how to use a Log4j logger
reference in beans that do not have a notion of what the underlying servlet
context is?  The only way I can see how to get this to work is to pass the
logger reference as an argument in the bean's constructor.  

My query does seem to be out of context for this list so my apologies in
advance.

AB

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 2 August 2003 3:24 AM
To: Tomcat Users List
Subject: RE: Servlets  JSPs log to different files



Howdy,
Then use log4j.

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Rick Roberts [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2003 1:18 PM
To: Tomcat Users List
Subject: Re: Servlets  JSPs log to different files



 How are you logging in your servlets?  Are you using 
 System.out/System.err?  If so, don't use them, and instead use the
 ServletContext#log(..) methods.

Actually, they are mostly beans with no ServletContext :(

--
***
* Rick Roberts*
* Advanced Information Technologies, Inc. *
***


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




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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




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



Combining Jboss Tomcat?

2003-07-12 Thread Adrian Beech
G'day folks,

I currently have an existing Tomcat 4.1.24 and J2SE 1.4.2 set up under
Windows XP Pro and all seems to be sweet.  Now I'd like to extend things a
bit and add Jboss into the loop for EJB support.  Are there HOWTO's floating
around which describe the installation and configuration of Tomcat and Jboss
in fairly easy to understand step by step instructions?

I see that Jboss 3.2.1 and 4.0 come bundled with Tomcat 4.1.24.  How would
this effect an existing Tomcat set up?

I am assuming (from what I've read thus far) that Tomcat 4.1.24 does not
support EJB... Or have I missed something?  Furthermore I'd assume that I
would need J2EE as opposed to J2SE?

AB



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



Resolving scriptlets when using a client side SCRIPT ... tag?

2003-07-05 Thread Adrian Beech
G'day folks,

Is it possible to get Tomcat to process a include file and resolve embedded
scriptlets if the file is referenced from a client side SCRIPT ... tag?
In the two .js files I'm trying to work with there are several scriptlets
that need to be resolved by Tomcat prior to sending the content along to the
browser.

I can use %@ include file=... % server side which works just dandy,
however the resulting content is easily visible to the user if they happen
to view the source of the currently displayed page.  My preference is to use
SCRIPT TYPE=text/javascript LANGUAGE=JavaScript
SRC=Includes/InboundContact_Form.js/SCRIPT client side so that the code
is not part of the displayable source on the client's browser.

The problem I've run into is that when using a SCRIPT ... tag the
scriptlets are not resolved by Tomcat and what I end up with is something
like 'var orgName = %= orgReference.getOrganisationName() %;' instead of
'var orgName = Brisbane City Council;' on the client's side.

Can anyone please help?

AB




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



internal server error

2003-03-21 Thread Adrian Epuras
I'm using tomcat 4.1.18 and apache 2.0.44 with JK2 on Slackware 8.1.
And from time to time I get something like this:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Apache/2.0.44 (Unix) DAV/2 mod_jk2/2.0.3-dev Server at 192.168.1.1 Port 80

On refresh the error is gone.
In the apache error_log this error looks like:

[Fri Mar 21 18:44:16 2003] [error] lb.getWorker() reenable
ajp13:localhost:8009
[Fri Mar 21 18:44:16 2003] [error] workerEnv.init() create slot epStat.4
failed
[Fri Mar 21 18:44:16 2003] [error] lb.service() worker failed 12 for
ajp13:localhost:8009
[Fri Mar 21 18:44:16 2003] [error] lb.service() unrecoverable error...
[Fri Mar 21 18:44:16 2003] [error] mod_jk.handler() Error connecting to
tomcat 12

Can anybody tell me what's going on??
Adrian.


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



Using SingleThreadModel under tomcat

2003-01-23 Thread Colquhoun, Adrian


Hi

I have a stateless servlet application in which I am considering
implementing SingleThreadModel. I note from the archives a number of posts
which suggest that implementing SingleThreadModel will impose a performance
overhead when running under tomcat. Could anyone provide me with a
explanation of how this performance impact comes about and (in relative
terms) the magnitude of this impact versus the potential impact of using
synchronisation blocks to ensure thread safe code ? 

Thanks

Adrian


===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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




Re: Apache Tomcat Virtual Host

2003-01-20 Thread adrian
Chris Schild wrote:


Hi all,
I am a newbie to Tomcat.  I'm having a problem with configuring the virtual host with Tomcat.  

The problem is that I cannot get the examples/jsp to work with the virtual host?!?  

A window pops up asking to open or save the source when I try to execute an example.

I'm sure I need to be more specific, I'm not quite sure what to ask at this point.  Do I not have the correct paths configured with Tomcat?

http://localhost/examples/jsp/index.html is functioning correctly.

I have gone thru the archives but nothing seems to be pointing me in the right direction.

Any advice would be much appreciated!
 

What connector are you using ? Where do you define the virtual host ? If 
you`re using mod_jk what are you JkMounts ?


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



Re: mod_jk tomcat/apache connector issue

2003-01-07 Thread adrian
One more idea, look at mod_jk.conf, I had the same error last night.
Line 4 dictates where mod_jk.so is located. I ran apachectl configtest
and it told me that mod_jk was not located at /etc/httpd/libexec/
I included the modJk=/usr/lib/apache/mod_jk.so , but it didn`t
work until I put mod_jk.so where it was looking.
Line 4 is the include for mod_jk.so.
Sounds like the same problem.
I was wrong about the connector, John said last night the JK2 connectors
backwards compatable with jk.

John Bullock wrote:


Thanks Adrian... I commented out the JK2 connector in server.xml and
uncommented the JK connector... still got the 'syntax error on line 4' error
message when attempting to start apache.

I also followed the instructions for trying to build coyote/JK2 on the URL
you posted before I gave up and tried to do mod_jk instead... the mod_jk2
problems I had were in step 8 where you run 'ant native'... the 'ant' in the
root gave me jtc.jar with no problems, but when I did 'ant native' in the
/jk directory, the build failed with the following:

  [so] StdErr:
  [so] ld: warning: option -o appears more than once, first setting
taken
  [so] ld: fatal: file mod_jk.so: cannot open file: No such file or
directory
  [so] ld: fatal: File processing errors. No output written to
.libs/mod_jk.so
  [so] collect2: ld returned 1 exit status

Tried rebuilding from scratch and all sorts of things before throwing in the
towel and following John Turner's how-to, but I can't seem to get that one
to work either... I must be missing something because I know it can't be
this hard to get it to work. :(

[ j o h n ]


 

The reason I asked was the default connector on 8009 is for JK2 , right
below it commented
out is the jk connector, I had to make the change recently for an
Apache2 config.
Also for building mod_jk, check out
http://www.pubbitch.org/jboss/mod_jk2.html,
may give a little insight.
   



-Original Message-
From: adrian [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:56 PM
To: Tomcat Users List
Subject: Re: mod_jk tomcat/apache connector issue


John Bullock wrote:

 

I'll try to explain.. :)

For a long time, I've tried to build mod_jk with the 4.1.18 connectors
package to no avail... it wouldn't give any errors, but I'd wind up with a
mod_jk.la file (617 bytes) and no .so file whatsoever.

Using a link from John Turner's how-to, I downloaded a pre-compiled binary
of mod_jk and followed the configuration steps.

Just in case:
http://www.johnturner.com/howto/apache2-tomcat4112-sol8-howto.html

[ j o h n ]

-Original Message-
From: adrian [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:38 PM
To: Tomcat Users List
Subject: Re: mod_jk tomcat/apache connector issue


John Bullock wrote:



   

Haven't seen this anywhere, but when I try to start apache (2.0.43) with


 

the


   

mod_jk module enabled, I get:

#apachectl start
Syntax error on line 4 of /usr/local/tomcat/conf/auto/mod_jk.conf:
Can't locate API module structure `jk_module' in file
/usr/local/apache2/modules/mod_jk.so: ld.so.1:


 

/usr/local/apache2/bin/httpd:


   

fatal: jk_module: can't find symbol
#

Tomcat starts up correctly with working examples, however.  I think this
 

is
 

a library issue, though it seems like it'd happen more often and be in the
FAQ?

using:
Tomcat 4.1.18
Apache 2.0.43
Java 1.4.1_01-b01

[ j o h n ]


--
To unsubscribe, e-mail:


 

mailto:[EMAIL PROTECTED]


   

For additional commands, e-mail:


 

mailto:[EMAIL PROTECTED]


   




 

Are you using mod_jk or mod_jk2 ? Tomcat 4.1.18 is setup for jk2 by
   

default.
 


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




   

The reason I asked was the default connector on 8009 is for JK2 , right
below it commented
out is the jk connector, I had to make the change recently for an
Apache2 config.
Also for building mod_jk, check out
http://www.pubbitch.org/jboss/mod_jk2.html,
may give a little insight.





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



 





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




Multiple Virtual hosts, setting DocumentRoot

2003-01-07 Thread adrian
Anyone got an example mod_jk.conf, the one created isn`t working for me.

Adrian


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




Virtual Host + Tomcat + Apache

2003-01-06 Thread Adrian Damn it!
Having trouble with the vhosts with mod_jk.
I can`t seem to get http://stafford.com/index.html to show up unless I
set the DocumentRoot in the VirtualHost directive to 
/usr/local/tomcat/webapps/stafford.
But when I add an additional Virtual host it pulls the same DocumentRoot.



 Host name=stafford.com debug=0 appBase=webapps unpackWARs=true
Logger className=org.apache.catalina.logger.FileLogger
  directory=logs prefix=stafford. suffix=.log 
timestamp=true/
Context path= docBase=stafford debug=0 reloadable=true/
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig 
append=true
forwardAll=false modJk=/usr/local/apache/libexec/mod_jk.so
workersConfig=/usr/local/tomcat/conf/jk/workers.properties /


/Host


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



Re: Virtual Host + Tomcat + Apache

2003-01-06 Thread adrian
Actually I would just as soon pull index.jsp instead. I tried setting 
Document Roots myself,
including my own mod_jk.conf from another directory and it works for the 
first, and the
second ignores its  DocumentRoot.
Here is my mod_jk.conf

Turner, John wrote:

index.html doesn't go to Tomcat, so you would need to set the DocumentRoot
in httpd.conf for Apache to find that file.

Can you add your second host, start Tomcat, and then post the resulting
mod_jk.conf file?  That would give us an idea of what Apache is being told.

John


-Original Message-
From: Adrian Damn it!
To: [EMAIL PROTECTED]
Sent: 1/6/03 6:00 PM
Subject: Virtual Host + Tomcat + Apache

Having trouble with the vhosts with mod_jk.
I can`t seem to get http://stafford.com/index.html to show up unless I
set the DocumentRoot in the VirtualHost directive to 
/usr/local/tomcat/webapps/stafford.
But when I add an additional Virtual host it pulls the same
DocumentRoot.



 Host name=stafford.com debug=0 appBase=webapps
unpackWARs=true
Logger className=org.apache.catalina.logger.FileLogger
  directory=logs prefix=stafford. suffix=.log 
timestamp=true/
Context path= docBase=stafford debug=0
reloadable=true/
Listener className=org.apache.ajp.tomcat4.config.ApacheConfig 
append=true
forwardAll=false modJk=/usr/local/apache/libexec/mod_jk.so
workersConfig=/usr/local/tomcat/conf/jk/workers.properties /


/Host


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



 




## Auto generated on Mon Jan 06 18:15:42 EST 2003##

IfModule !mod_jk.c
  LoadModule jk_module libexec/mod_jk.so
/IfModule

JkWorkersFile /usr/local/tomcat/conf/jk/workers.properties
JkLogFile /usr/local/tomcat/logs/mod_jk.log

JkLogLevel emerg



VirtualHost schulerhawaii.com
ServerName schulerhawaii.com

 schulerhawaii.com:/examples 

# Static files 
Alias /examples /usr/local/tomcat/webapps/examples

Directory /usr/local/tomcat/webapps/examples
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /examples/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /examples/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /examples/jsp/security/protected/j_security_check  ajp13
JkMount /examples/snoop  ajp13
JkMount /examples/CompressionTest  ajp13
JkMount /examples/servlet/*  ajp13
JkMount /examples/*.jsp  ajp13
JkMount /examples/servletToJsp  ajp13
JkMount /examples/SendMailServlet  ajp13

 schulerhawaii.com:/hawaii 

# Static files 
Alias /hawaii /usr/local/tomcat/webapps/hawaii

Directory /usr/local/tomcat/webapps/hawaii
Options Indexes FollowSymLinks
DirectoryIndex index.jsp 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /hawaii/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /hawaii/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /hawaii/*.jsp  ajp13

 schulerhawaii.com:/stafford 

# Static files 
Alias /stafford /usr/local/tomcat/webapps/stafford

Directory /usr/local/tomcat/webapps/stafford
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /stafford/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /stafford/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /stafford/*.jsp  ajp13

 schulerhawaii.com:/webdav 

# Static files 
Alias /webdav /usr/local/tomcat/webapps/webdav

Directory /usr/local/tomcat/webapps/webdav
Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /webdav/WEB-INF/*
AllowOverride None
deny from all
/Location

Location /webdav/META-INF/*
AllowOverride None
deny from all
/Location

JkMount /webdav/*.jsp  ajp13

 schulerhawaii.com:/tomcat-docs 

# Static files 
Alias /tomcat-docs /usr/local/tomcat/webapps/tomcat-docs

Directory /usr/local/tomcat/webapps/tomcat-docs
Options Indexes FollowSymLinks
DirectoryIndex index.html index.htm index.jsp 
/Directory


# Deny direct access to WEB-INF and META-INF
#
Location /tomcat-docs

Re: mod_jk tomcat/apache connector issue

2003-01-06 Thread adrian
John Bullock wrote:


Haven't seen this anywhere, but when I try to start apache (2.0.43) with the
mod_jk module enabled, I get:

#apachectl start
Syntax error on line 4 of /usr/local/tomcat/conf/auto/mod_jk.conf:
Can't locate API module structure `jk_module' in file
/usr/local/apache2/modules/mod_jk.so: ld.so.1: /usr/local/apache2/bin/httpd:
fatal: jk_module: can't find symbol
#

Tomcat starts up correctly with working examples, however.  I think this is
a library issue, though it seems like it'd happen more often and be in the
FAQ?

using:
Tomcat 4.1.18
Apache 2.0.43
Java 1.4.1_01-b01

[ j o h n ]


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



 

Are you using mod_jk or mod_jk2 ? Tomcat 4.1.18 is setup for jk2 by default.



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




Re: mod_jk tomcat/apache connector issue

2003-01-06 Thread adrian
John Bullock wrote:


I'll try to explain.. :)

For a long time, I've tried to build mod_jk with the 4.1.18 connectors
package to no avail... it wouldn't give any errors, but I'd wind up with a
mod_jk.la file (617 bytes) and no .so file whatsoever.

Using a link from John Turner's how-to, I downloaded a pre-compiled binary
of mod_jk and followed the configuration steps.

Just in case:
http://www.johnturner.com/howto/apache2-tomcat4112-sol8-howto.html

[ j o h n ]

-Original Message-
From: adrian [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 5:38 PM
To: Tomcat Users List
Subject: Re: mod_jk tomcat/apache connector issue


John Bullock wrote:

 

Haven't seen this anywhere, but when I try to start apache (2.0.43) with
   

the
 

mod_jk module enabled, I get:

#apachectl start
Syntax error on line 4 of /usr/local/tomcat/conf/auto/mod_jk.conf:
Can't locate API module structure `jk_module' in file
/usr/local/apache2/modules/mod_jk.so: ld.so.1:
   

/usr/local/apache2/bin/httpd:
 

fatal: jk_module: can't find symbol
#

Tomcat starts up correctly with working examples, however.  I think this is
a library issue, though it seems like it'd happen more often and be in the
FAQ?

using:
Tomcat 4.1.18
Apache 2.0.43
Java 1.4.1_01-b01

[ j o h n ]


--
To unsubscribe, e-mail:
   

mailto:[EMAIL PROTECTED]
 

For additional commands, e-mail:
   

mailto:[EMAIL PROTECTED]
 




   

Are you using mod_jk or mod_jk2 ? Tomcat 4.1.18 is setup for jk2 by default.



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



 

The reason I asked was the default connector on 8009 is for JK2 , right 
below it commented
out is the jk connector, I had to make the change recently for an 
Apache2 config.
Also for building mod_jk, check out 
http://www.pubbitch.org/jboss/mod_jk2.html,
may give a little insight.





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



virtual hosts | more

2003-01-03 Thread Adrian
Anybody got a server.xml example with virtual hosts for tomcat 4.1.xx ?
I`m missing something. 

Adrian



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




RE: Logger Valves

2002-12-18 Thread Adrian
Thanks, it`s always the little things that get you.

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 18, 2002 8:21 AM
To: Tomcat Users List
Subject: Re: Logger Valves


Get 4.1.17 and use the attribute rotatable=false for AccessLogValve.

-Tim

Adrian wrote:

 Does anyone know how to get the 2002-12-17 out of the log file name ? My
log
 rotater won`t do
 wild cards. I need all the logs to have the same name.

 Adrian Thiele




--
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: Apache-Tomcat HOWTO, Hey John Turner !

2002-12-17 Thread Adrian


John ,
I really like all the work you have done shoeing people how to use mod_jk.
I have a build script
for FreeBSD and a binary if you would like to add it to your site.

Adrian Thiele


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




Logger Valves

2002-12-17 Thread Adrian


Does anyone know how to get the 2002-12-17 out of the log file name ? My log
rotater won`t do
wild cards. I need all the logs to have the same name.

Adrian Thiele


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




Session Persistence retrieving old session data

2002-12-05 Thread Adrian Richter
I am using Tomcat 4.0.3 on Solaris with JDK 1.4.

 

I have been using the Persistence Store to save the Session information.
This works fine except from my pont of view, but users are giving me grief
that when they run the web application, the information stored in their
sessions is what they had in before a few minutes earlier. For example, I
have written a search page that stores the search criteria into the session
scope. After looking at the results and running another search, they get the
results of a previous search they did minutes earlier. 

It seems that the a copy of the session is being made, but when they make
subsequent requests, the session is giving them an older version of the
session then the one they should be using.

 

When I disable persistence manager, we have no problems and everything works
fine.

Here is a copy of context in server.xml:

 

Context path= docBase=ROOT debug=0

  Manager className=org.apache.catalina.session.PersistentManager
debug=0 saveOnRestart=true maxActiveSessions=-1 minIdleSwap=0
maxIdleSwap=120 maxIdleBackup=0

Store className=org.apache.catalina.session.FileStore/

  /Manager

/Context

 

Adrian Richter

 




Anybody have a Virtual host example ?

2002-11-18 Thread Adrian
Does anyone have an Apache + Tomcat virtual
host example I can see. Server.xml would be great.
I need to log seperately for each hosts, and
config mod_jk. Does my Tomcat virtual hosting
mirror my apache config with mod_jk connectors ?


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




RE: unable to authenticate against company-generated certificate

2002-11-18 Thread Adrian Richter
Check out this link for some help:
http://javaalmanac.com/egs/javax.net.ssl/GetCert.html

Only problem is that it requires JDK 1.4. The JSSE packages do not cut it.

Adrian

-Original Message-
From: Becky Phaneuf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 19 November 2002 1:25 PM
To: Tomcat Users List[EMAIL PROTECTED]
Subject: unable to authenticate against company-generated certificate


Hi everyone,

I have a servlet that is tasked to download various files from a secure
site.   It uses an HttpsURLConnection to connect to the site's root and
passes my Authenticator class (w/ username and password) as the default
authenticator.   It used to work fine until the site's admin replaced their
verisign certificate with an in-house-generated one.  Now my servlet
receives a java.security.cert.CertificateException stating that it cannot
find a trusted certificate.

I tried adding the server's certificate to my server's keystore, but I'm
afraid that didn't work.  I believe I have to obtain the certificate and
somehow validate it.  If anyone has experience with this I'd greatly
appreciated it.

Thanks in advance,
-Becky


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



using multiple Contexts

2002-11-17 Thread Adrian
I`m having trouble logging for multiple Contexts.
does this look right
Context path=/mynewdir docbase=mynewdir debug=0
Valve className=org.apache.catalina.valves.AccessLogValve
prefix=mynewdirLog suffix=.txt /
Context/

does this need to nest inside of the default Context ?
If anyone has an server.xml that works in this capacity,
I would appreciate it.

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




Tomcat 4.1.12 without the scripts

2002-11-10 Thread Adrian Threlfall
Can some one tell me how to start Tomcat 4.1.12 without the startup.bat
script. I would like to the start it from the command line

eg.
java options classname


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




RE: Correction RE: 503 Servlet Unavailable when migrating from tomcat 4.0.1 to 4.0.5

2002-10-08 Thread Colquhoun, Adrian

For Information

This problem was due to the WebappClassLoader correctly refusing to load the
.jar file containing my servlet because it also contained some older
javax.servlet classes which is explicitly forbidden in the servlet spec 2.3

Adrian

-Original Message-
From: Colquhoun, Adrian [mailto:[EMAIL PROTECTED]]
Sent: 02 October 2002 15:58
To: 'Tomcat Users List'
Subject: Correction RE: 503 Servlet Unavailable when migrating from
tomcat 4.0.1 to 4.0.5



Correction - this is a migration from 4.0.1 to 4.0.5 !

Sorry

Adrian

-Original Message-
From: Colquhoun, Adrian [mailto:[EMAIL PROTECTED]]
Sent: 02 October 2002 15:49
To: '[EMAIL PROTECTED]'
Subject: 503 Servlet Unavailable when migrating from tomcat 4.0.4 to
4.0.5


Hi,

I have recent migrated from tomcat 4.0.4 to tomcat 4.0.5 (Windows 2000, java
1.3.1). My tomcat 4.0.5 installation appears to be working correctly (I can
execute the servlet examples etc).

I have attempted to migrate an existing web application from the 4.0.4
installation the 4.0.5 installation by copying it (i.e. its directory under
the webapps directory) and restarting the server. The application works
happily under 4.0.4 but immediately generates a 503 Servlet Unavailable
error in 4.0.5. I have examined the tomcat log which indicates that the
problem is a ClassNotFound exception for my servlet class (i.e. the class
loader cannot find it under 4.0.5). The servlet class required is present
and is located in a .jar file under the ./lib directory of the web
application.  If I copy the .jar file to the {TOMCAT_HOME}/lib directory the
servlet is found !

So, my question is - Why cant me servlet be located in the .jar file under
the lib directory (using 4.0.5) ?


Thanks

Adrian



===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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

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




503 Servlet Unavailable when migrating from tomcat 4.0.4 to 4.0.5

2002-10-02 Thread Colquhoun, Adrian

Hi,

I have recent migrated from tomcat 4.0.4 to tomcat 4.0.5 (Windows 2000, java
1.3.1). My tomcat 4.0.5 installation appears to be working correctly (I can
execute the servlet examples etc).

I have attempted to migrate an existing web application from the 4.0.4
installation the 4.0.5 installation by copying it (i.e. its directory under
the webapps directory) and restarting the server. The application works
happily under 4.0.4 but immediately generates a 503 Servlet Unavailable
error in 4.0.5. I have examined the tomcat log which indicates that the
problem is a ClassNotFound exception for my servlet class (i.e. the class
loader cannot find it under 4.0.5). The servlet class required is present
and is located in a .jar file under the ./lib directory of the web
application.  If I copy the .jar file to the {TOMCAT_HOME}/lib directory the
servlet is found !

So, my question is - Why cant me servlet be located in the .jar file under
the lib directory (using 4.0.5) ?


Thanks

Adrian



===
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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




  1   2   >