Tomcat and OpenSSL

2002-05-30 Thread Animesh Chaturvedi - US


Hi 


I am using Tomcat 4.0.3 and currently using JSSE for https.
JSSE is very slow. 
If I use Apache for providing SSL support. it works fine and is fast.
But I do not want to put Apache just for supporting SSL.

Is anyone aware how can Tomcat be integrated with openssl directly ??

One of the commercial servlet engine (Resin) supports Openssl directly. 
I was wondering how Tomcat can be integrated with OpenSSL.

I will really appreciate any help or guidance.

Thanks.


Animesh




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




RE: catalina.LoggerBase class should have public access

2002-05-14 Thread Animesh Chaturvedi - US

Jeff

Thanks for the info.

Animesh

-Original Message-
From: Jeff Larsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 7:59 AM
To: Tomcat Users List
Subject: Re: catalina.LoggerBase class should have public access


I was whining about this too about a month ago, but I failed
to spark a discussion on this list. So I went to Bugzilla
and entered it as a feature request. Apparently, somebody
agreed with me. If you look at the nightly build source code, 
you will see that LoggerBase is now public and FileLogger is
no longer final. You can now easily subclass FileLogger and
need only override a small number of methods to achieve the 
desired results.

Now it's just a matter of waiting for the next production
quality release (unless you like living on the edge!).

Jeff

- Original Message - 
From: Animesh Chaturvedi - US [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Monday, May 13, 2002 6:03 PM
Subject: catalina.LoggerBase class should have public access


 
 Hi
 
 I have a requirement of a single log file instead of having the default
log
 files created on a daily basis. Since I could not configure Tomcat for
this,
 I started writing my own MyFileLogger class. I am extending
 org.apache.catalina.logger.LoggerBase and my class is in my own package.
But
 since the LoggerBase class does not have public access, it is not
accessible
 to other packages. I cannot extend org.apache.catalina.logger.FileLogger
 class as its a final class and I do not wish to change Tomcat code.
 
 Should not this class have public access ? just like
 org.apache.catalina.valves.RequestFilterValve class has public access, and
I
 was able to write my own   Valve for AccessControlList.
 
 
 thanks
 
 Animesh
 
 
 --
 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]




catalina.LoggerBase class should have public access

2002-05-13 Thread Animesh Chaturvedi - US


Hi

I have a requirement of a single log file instead of having the default log
files created on a daily basis. Since I could not configure Tomcat for this,
I started writing my own MyFileLogger class. I am extending
org.apache.catalina.logger.LoggerBase and my class is in my own package. But
since the LoggerBase class does not have public access, it is not accessible
to other packages. I cannot extend org.apache.catalina.logger.FileLogger
class as its a final class and I do not wish to change Tomcat code.

Should not this class have public access ? just like
org.apache.catalina.valves.RequestFilterValve class has public access, and I
was able to write my own   Valve for AccessControlList.


thanks

Animesh


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




how to change ErrorReportValve??

2002-04-25 Thread Animesh Chaturvedi - US

Hi

I want to change default ErrorReportValve to my customized
ErrorReportValve.

When I add my customized MyErrorReportValve inside host element as

Host
Valve className=MyErrorReportValve 
/Host

MyErrorReportValve gets added to valve list earlier than ErrorReportValve
and hence the error is still being handled by ErrorReportValve.

If I move the Valve element from Host to Context, I do not see it in error
report stack trace.

Does any one have an idea how to use your own customized ErrorReportValve???



Animesh






Customizing error responses

2002-04-24 Thread Animesh Chaturvedi - US

Hi 
How can I  configure Tomcat to respond with my own custom Web pages or other
HTTP resources when particular HTTP errors or Java exceptions occur, or Jsp
Compilation errors instead of responding with the standard tomcat error
response pages.

I know I have to use directive like the following in web.xml
error-page
 error-code 404/error-code
 location/webdev/a.jsp /location
/error-page
error-page
 exception-type java.lang.Throwbale/exception-type
 location/webdev/error.html /location
/error-page
What I am not getting is the information like for 404 pages the name of
resource that is not available. I used request.getRequestURI() in a.jsp and
it returned me /webdev/a.jsp instead of  the bogus url I typed.
I want all the information like standard tomcat error response pages but
customize the look .
Thanks
Animesh










web.xml parse error

2002-04-23 Thread Animesh Chaturvedi - US

Hi 

I am adding the following error-page directive to web.xml. 

error-page 
error-code404/error-code 
location/webdev/notfound.jsp/location 
/error-page 

I always get the following error on starting tomcat

Apache Tomcat/4.0.3
PARSE error at line 866 column 11
org.xml.sax.SAXParseException: The content of element type web-app must
match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil
ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin
g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se
curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca
l-ref*).

I tried putting the error-page directive in tomcat/conf/web.xml and then in
my application context web.xml. But nothing works. 

One more question I don't like to see Tomcat's 500 Internal Server error
page or 403 page. I want my customized page to show up. How can I do that?



Thanks 

Animesh

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




RE: web.xml parse error

2002-04-23 Thread Animesh Chaturvedi - US




Where can I find the correct order for web.xml. I am going through the DTD
but it does not mention any preferred order. I tried moving my error-page
directive inside web.xml, but that did not help ??

My web.xml (this is the web.xml shipped in tomcat/conf) has following
entries in this order

web-app
  servlet
servlet-namedefault/servlet-name
 
servlet-classorg.apache.catalina.servlets.DefaultServlet/servlet-class
init-param
  param-namedebug/param-name
  param-value0/param-value
/init-param
init-param
  param-namelistings/param-name
  param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet
 
  :
  :
  : 
  
  other similar servlet entries

  :
  :  
  servlet-mapping
servlet-namedefault/servlet-name
url-pattern//url-pattern
  /servlet-mapping
  
  :
  :
  :
   other servlet mappings

  :
  session-config
session-timeout30/session-timeout
  /session-config

  :
  mime-mapping
extensionabs/extension 
mime-typeaudio/x-mpeg/mime-type
  /mime-mapping

  :
  :
  :
   other mime-mappings   

  :
  :
  
  welcome-file-list
welcome-fileindex.html/welcome-file
welcome-fileindex.htm/welcome-file  
welcome-fileindex.jsp/welcome-file
  /welcome-file-list

/web-app


Where do you think I should put the error-page directive in here??

Thanks

Animesh



   

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 11:15 AM
To: Tomcat Users List
Subject: Re: web.xml parse error



You probably have the web.xml defined in an incorrect order. To answer your
other question, you could define a 403 (forbidden) error page. Note this
may only work right when using form-based authentication. With Basic
authentication, you might need to override the Authenticator class that
does the Basic authentication. As for 500 Internal Server error, many users
have faced problems in defining an error page. But you could try doing the
same thing as you have done for a 404 error-page declaration. Or you could
probably define an error page directive for Servlet Exception.

RS





Animesh Chaturvedi - US [EMAIL PROTECTED] on 04/23/2002
01:03:57 PM

Please respond to Tomcat Users List [EMAIL PROTECTED]

To:'Tomcat Users List' [EMAIL PROTECTED]
cc:

Subject:web.xml parse error

Hi

I am adding the following error-page directive to web.xml.

error-page
 error-code404/error-code
 location/webdev/notfound.jsp/location
/error-page

I always get the following error on starting tomcat

Apache Tomcat/4.0.3
PARSE error at line 866 column 11
org.xml.sax.SAXParseException: The content of element type web-app must
match
(icon?,display-name?,description?,distributable?,context-param*,filter*,fil

ter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mappin

g*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,se

curity-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-loca

l-ref*).

I tried putting the error-page directive in tomcat/conf/web.xml and then in
my application context web.xml. But nothing works.

One more question I don't like to see Tomcat's 500 Internal Server error
page or 403 page. I want my customized page to show up. How can I do that?



Thanks

Animesh

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










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

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




RE: OS X + Tomcat on Port 80...

2002-04-19 Thread Animesh Chaturvedi - US



For binding to ports  1024. You need to have root permissions. Or in your
etc/sysctl.conf add kern.netprivgroup=yourgroupid

Animesh

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 11:29 AM
To: [EMAIL PROTECTED]
Subject: OS X + Tomcat on Port 80...


Hi...

I have recently installed Tomcat on Mac OS X.
Everything works fine when set to listen on Port 8080
(i.e. When I point my browser to http://localhost:8080 I get the Tomcat 
page and am able to execute the examples.)
..but when I change the server.xml file so that Tomcat listens on Port 80, 
restart Tomcat, and point my browser to http://localhost I get nothing.

What's up with that?!

Sorry if this has already been addressed. I just joined the list and I did
do 
a cursory search of the archives but I didn't see anything pertaining to
this.

Thanks for any help...


Jerry
Barnes


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

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




RE: Question about Tomcat-Apache HOWTO

2002-04-16 Thread Animesh Chaturvedi - US

Well
the document you are pointing to, is for old version of Tomcat. Which
version of Tomcat are you using?? 

Animesh

-Original Message-
From: Cheng Yan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 1:05 PM
To: Tomcat Users List
Subject: Question about Tomcat-Apache HOWTO


According to an article Tomcat-Apache HOWTO on
http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html :

QUOT.
==
When Tomcat starts up it will automatically generate a configuration file
for Apache in TOMCAT_HOME/conf/jserv/tomcat-apache.conf. Most of the time
you don't need to do anything but include this file (appending Include
TOMCAT_HOME/conf/jserv/tomcat-apache.conf) in your httpd.conf.

UNQUOT.

However, when I start tomcat on my machine, everything seems fine except
that I do not see file tomcat-apache.conf. I assume that TOMCAT_HOME is
the same as CATALINA_HOME, right? I don't even see a subdir call jserv. Is
this normal?

BYW, my machine is ultra-sparc 1 running Solaris 8. I can visit
http://localhost:8080, though. And there are only following files under my
$CATALINA_HOME/conf:

% cd $CATALINA_HOME/conf
% ls
catalina.policy
server.xml
tomcat-users.xml
web.xml

Could someone explain it to me? Thanks.


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

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




RE: Question about Tomcat-Apache HOWTO

2002-04-16 Thread Animesh Chaturvedi - US


Tomcat 3.0 and Tomcat4.0 are fundamentally very different. 
Tomcat 4.0.3 will not create any tomcat-apache.conf.
For using Tomcat and Apache together you can use mod_webapp.

Follow this link

http://dcb.sun.com/practices/howtos/tomcat_apache.jsp


Animesh

-Original Message-
From: Cheng Yan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 1:16 PM
To: Tomcat Users List
Subject: Re: Question about Tomcat-Apache HOWTO


My tomcat is 4.0.3. Should this version create the same file
tomcat-apache.conf or something equivalent?

Thanks,


- Original Message -
From: Animesh Chaturvedi - US [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, April 16, 2002 16:08
Subject: RE: Question about Tomcat-Apache HOWTO


 Well
 the document you are pointing to, is for old version of Tomcat. Which
 version of Tomcat are you using??

 Animesh

 -Original Message-
 From: Cheng Yan [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 16, 2002 1:05 PM
 To: Tomcat Users List
 Subject: Question about Tomcat-Apache HOWTO


 According to an article Tomcat-Apache HOWTO on
 http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html :

 QUOT.
 ==
 When Tomcat starts up it will automatically generate a configuration file
 for Apache in TOMCAT_HOME/conf/jserv/tomcat-apache.conf. Most of the time
 you don't need to do anything but include this file (appending Include
 TOMCAT_HOME/conf/jserv/tomcat-apache.conf) in your httpd.conf.
 
 UNQUOT.

 However, when I start tomcat on my machine, everything seems fine except
 that I do not see file tomcat-apache.conf. I assume that TOMCAT_HOME is
 the same as CATALINA_HOME, right? I don't even see a subdir call jserv. Is
 this normal?

 BYW, my machine is ultra-sparc 1 running Solaris 8. I can visit
 http://localhost:8080, though. And there are only following files under my
 $CATALINA_HOME/conf:

 % cd $CATALINA_HOME/conf
 % ls
 catalina.policy
 server.xml
 tomcat-users.xml
 web.xml

 Could someone explain it to me? Thanks.


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

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



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

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




Tomcat HTTPS

2002-04-16 Thread Animesh Chaturvedi - US


Hi 


I am using JSSE for HTTPS through Tomcat. Every time I point my browser
through HTTPS it takes about 35 seconds for the certificate to pop up. Its
really slow.
I have also tried using Apache for HTTPS. Through Apache it is fast, but I
do not want to have the overhead of using Apache. 

Has anybody tried integrating Tomcat with OpenSSL??

Tomcat takes a lot of time to come up, about 2 minutes. Is there a way this
time can be reduced significantly or use a trimmed down Tomcat.
I have used Resin its really very fast and comes with support for OpenSSL,
but its not free.


Animesh





How to use embedded tomcat

2002-04-15 Thread Animesh Chaturvedi - US

Hi 

I wish to use embedded Tomcat. Can somebody let me know how can I do that?? 


Thanks

Animesh



Apache-tomcat: JVM dies

2001-04-24 Thread Animesh Chaturvedi - US
Title: Apache-tomcat: JVM dies 





Hi 
I posted this question earlier too but did not get any answer. Sorry for repeating it again but its really urgent for me.

I have tried searching for an answer on tomcat archives and other places but did not find any.
I am trying to run Apache 1.3.17 with SSL and Tomact3.2.1 and using mod_jserv as connector. 
Tomcat 3.2.1 works fine in standalone mode. 
But when I run it through apache. The JVM dies multiple times in a row and does not come up. 
I do not get any error message. I just get VM spwaned VM exited.
I am stuck.


I will appreciate any help 
Thanks in advance 
Animesh 





JVM dies

2001-04-23 Thread Animesh Chaturvedi - US
Title: JVM dies







Hi 


I am trying to run Apache 1.3.17 with SSL and Tomact3.2.1 and using mod_jserv as connector.


Tomcat 3.2.1 works fine in standalone mode. 


But when I run it through apache. The JVM dies multiple times in a row and does not come up.


I do not get any error message.


I will appreciate any help


Thanks in advance


Animesh





NoClassDefFoundError:XmlMapper

2001-04-20 Thread Animesh Chaturvedi - US
Title: NoClassDefFoundError:XmlMapper 







Hi 


I have been running tomcat 3.2.1 successfully with Kaffe JVM over NetBSD in standalone mode.


I tried running Tomcat3.2.1 with Apache 1.3.17 with ssl and mod_jserv as connector.


As soon as I start apache in error log I see


java.lang.NoClassDefFoundError: org/apache/tomcat/util/xml/XmlMapper
 at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)


Any request to tomcat results in Internal Server Error.


The webserver.jar file does have XmlMapper class and it works fine when Tomcat is run in standalone mode.


Any help or pointers will be really appreciated.


Thanks in advance


Animesh





Tomcat3.21 not starting properly with apache

2001-04-20 Thread Animesh Chaturvedi - US
Title: Tomcat3.21 not starting properly with apache







Hi I am trying to run Tomcat 3.2.1 with Apache 1.3.17. i am using Kaffe JVM and NetBSD and mod_jserv.


Tomcat 3.2.1 works fine as standalone in my environment. 


When I try to run it with apache and SSL. I get an error in apache error_log


java.lang.NoClassDefFoundError: org/apache/tomcat/util/xml/XmlMapper
at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235) .
I checked the classpath and its showing the corrcet webserver.jar in classpath.
Since the same webserver.jar works well in standalone mode. I guess there is something else to this.
I tried searching on tomcat-list archive but could not find anything.
I had been running Tomcat3.1.1 successfully on my environment. 
Let me know whats going wrong.


Thanks in advance


Animesh









Tomcat 3.2.1 unable to load jspCompilerPlugin

2001-04-19 Thread Animesh Chaturvedi - US


I am trying to get Tomcat 3.2.1 running with Kaffe JVM. Tomcat 3.1.1 runs
well with KaffeJVM

I am trying to include my jspCompiler class instead of the default one. But
tomcat 3.2.1 is unable 
to extract jspCompilerPlugin name from web.xml. 

I put System.out.println statement in
org/apache/jasper/EmbededServletOptions. It returns a value of null
for JspCompilerPlugin.

While in Tomcat 3.1.1 I was able to load my JspCompiler class just be
specifying my class in web.xml.

Does anyone has an idea where do I need to modify in Tomcat3.2.1 so that its
able to work. Its not even working with JikesJavaCompiler and returning the
value of null.

I will really appreciate if someone can help me sort this stuff soon.

Thanks in advance

Animesh




Bug in tomcat3.2.1 RecycleBufferedInputStream class - or solution to ContextManager: error reading request:ArrayIndexOutOfBoundsException

2001-04-18 Thread Animesh Chaturvedi - US


Hi 

Tomcct 3.2.1 does not work with Kaffe JVM. When a request is sent to Tomcat 

you get following error

ContextManager: Error reading request, ignored -
java.lang.ArrayIndexOutOfBoundsException 
at java.lang.System.arraycopy(System.java:native) 
at java.io.BufferedInputStream.read(BufferedInputStream.java:118) 
at java.io.BufferedInputStream.read(BufferedInputStream.java:69) 
at
org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter.
java:115) 
at
org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInpu
tStream.java:106) 
at
org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputS
tream.java:128) 
at
javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138) 
at
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpReques
tAdapter.java:129) 
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:195) 
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) 
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) 
at java.lang.Thread.run(Thread.java:325) 


After lot of debugging I found that there is bug with
RecycleBufferedInputStream. 
The original RecycleBufferedInputStream class only resets count = 0.
This results sometimes in count to be set to zero and pos is not changed so
it is now greater than count. and 
when yo do a System.arraycopy with length = count -pos. It gets a negative
value hence the array index out of bounds exception. 

So you have to change the two functions in RecycleBufferedInputStream like
this.

public void setInputStream( InputStream is ) {
this.in = is;
this.pos = this.count = 0;
this.markpos = -1;
}

public void recycle() {
this.in = null;
this.pos = this.count = 0;
this.markpos = -1;
}


Now tomcat 3.2.1 works fine with Kaffe VM.


Animesh



RE: Where does System.out.println go under Tomcat

2001-04-17 Thread Animesh Chaturvedi - US



Hi 
Brian!!

Did 
you got the solution to your problem. I am facing the same problem. I am using 
unix and running tomcat as standalone.
I am 
trying to debug some classes. So I put some System.out.println statements 
in them. I have put these classes at the first position in classpath, so that 
these classes get picked up rather than those from the standard 
.jars

I 
expect these System.out.println statements to be displyed on console or in logs 
but could not find them. 

If 
anyone can point me where I am going wrong I will be 
grateful.

Thanks 
in advance

Animesh



  -Original Message-From: Brian Burridge 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, April 16, 2001 12:19 
  PMTo: [EMAIL PROTECTED]Subject: Re: Where 
  does System.out.println go under Tomcat
  I am using Unix, but when I do a 
  System.out.println the message does not come to my terminal window. Also, I 
  added this to my startup.sh:
  1$TOMCAT_HOME/stdout.log 
  2$TOMCAT_HOME/stderr.log 
  
  and it did not redirect my system.outs to either 
  log file.
  
  Under both ServletExec and Jrun, any System.out's 
  done within JSP actually go to a special error log and not to stout. Does 
  Tomcat not have that?
  
  Brian
  
- Original Message - 
From: 
Kevin Sangeelee 

To: [EMAIL PROTECTED] 

Sent: Monday, April 16, 2001 10:13 
AM
Subject: Re: Where does 
System.out.println go under Tomcat
The logs just go to stdout as normal. Assuming you're 
using a Unixvariant, when you run startup.sh from a console, the stdout 
output goes tothe console window by default. If you log out then you'll 
lose any furtheroutput, but Tomcat will continue as normal.I 
redirect stdout and stderr to separate files 
from$TOMCAT_HOME/bin/startup.sh as follows:$BASEDIR/tomcat.sh 
start "$@" $TOMCAT_HOME/stdout.log 
2$TOMCAT_HOME/stderr.logKevinOn Mon, 16 Apr 
2001, Brian Burridge wrote: I've put some system out prints in 
my JSP pages, but I cannot find the error logs. I've found the logs 
for the web site (apache's standards logs) and I've found a 
servlet.log and a jasper.log under the jakarta logs directory, but I 
have no idea where servlet errors 
go.


Context Manager: Error reading request

2001-04-12 Thread Animesh Chaturvedi - US
Title: Context Manager: Error reading request





Hi


I am trying to run Tomcat 3.2.1 on NetBSD with Kaffe JVM in standalone mode.


Everytime I send a request to the server I get the following exception



ContextManager: Error reading request, ignored - java.lang.ArrayIndexOutOfBoundsException
 at java.lang.System.arraycopy(System.java:native)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:118)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:69)
 at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter.java:115)
 at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInputStream.java:106)
 at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputStream.java:128)
 at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
 at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRequestAdapter.java:129)
 at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:195)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:325)



What is going wrong? I had no problem working with tomcat3.1.1. 


I am under pressure to reslove this issue. I will really appreciate any help regarding this.


Thanks in advance


Animesh





Error reading request

2001-04-11 Thread Animesh Chaturvedi - US
Title: Error reading request





Hi


I am trying to run Tomcat 3.2.1 on NetBSD with Kaffe JVM in standalome mode.


Everytime I send a request to the server I get the following exception



ContextManager: Error reading request, ignored - java.lang.ArrayIndexOutOfBoundsException
 at java.lang.System.arraycopy(System.java:native)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:118)
 at java.io.BufferedInputStream.read(BufferedInputStream.java:69)
 at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter.java:115)
 at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInputStream.java:106)
 at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputStream.java:128)
 at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
 at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRequestAdapter.java:129)
 at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.jav
a:195)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:325)



What is going wrong? I had no problem with tomcat3.1.1. 
I am under pressure to reslove this issue. I will really appreciate any help regarding this.


Thanks in advance


Animesh





RE: First ExceptionInInitializerError Then NoClassDefFoundError

2001-04-04 Thread Animesh Chaturvedi - US

Is your servlet part of a package?
if yes then you need to specify in web.xml 
file like the fuly classified path of the servlet
and in your WEB_INF/classes folder you need to reflect the whole pacakage
hierarchy.


Animesh



-Original Message-
From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 9:17 AM
To: '[EMAIL PROTECTED]'
Subject: RE: First ExceptionInInitializerError Then NoClassDefFoundError


Are you running the supplied examples or your own servlet?

Try compiling a helloworld servlet, then modifying it incrementally.

regards
lyndon


-Original Message-
From: Rajesh A [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 5:12 PM
To: [EMAIL PROTECTED]
Subject: First ExceptionInInitializerError Then NoClassDefFoundError


Everytime I start tomcat 3.2.1 (win2k) and run a servlet I get 
java.lang.ExceptionInInitializerError. Subsequent requests to the same 
servlet throw java.lang.NoClassDefFoundError. The servlet class file is 
located in the webapps/myapp/web-inf/classes/. This dir is in the classpath 
before starting tomcat.

I found similar problem reported in the archives but no solutions. I might 
have missed something very silly. Please help.

Rajesh
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.



RE: Hey I found the solution RE: Servlets do not run under Apache-tom cat

2001-03-30 Thread Animesh Chaturvedi - US

Yeah setting Context Manager home="/path-to-tomcat" did the trick.

Besides this in the tomcat.conf file

I did the following

ApJServMount /examples /root
Location /examples/WEB-INF/
AllowOverride None
Order allow,deny
Allow from all
/Location

without the Alias directive I had put earlier.

I can run all the example servlets and jsps without any problem through
apache 1.3.17,SSL, mod_jserv, Tomcat .
Apache handles the request to context manager. Now after you set context
manager home. it can resolve /examples accurately and serve the servlets. 

Cheers

Animesh  

-Original Message-
From: Todd Pfaff [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 9:01 AM
To: '[EMAIL PROTECTED]'
Cc: Animesh Chaturvedi - US
Subject: Re: Hey I found the solution RE: Servlets do not run under
Apache-tom cat 


On Thu, 29 Mar 2001, Animesh Chaturvedi - US wrote:

 Hi filip 
 
 I found the solution. You have to make a change in tomcat's server.xml
file.
 In the ContextManager section you have to set up a variable like
 home="TOMCAT_HOME".

That's all?  That solved your problem?  Something like this?
(TOMCAT_HOME = /tomcat in my case)

  ContextManager 
  home="/tomcat" debug="0" workDir="work" showDebugInfo="true" 

 Now you do  not need to use an Alias directive they all will work.

Are you saying that, for example, with this Alias directive removed from
your tomcat-apache.conf file:

  Alias /examples "/tomcat/webapps/examples"
  Directory "/tomcat/webapps/examples"
  Options Indexes FollowSymLinks
  /Directory
  ApJServMount /examples/servlet /examples

that you can still load the examples index page:

  http://host/examples/servlets/index.html

and then run the example servlet:

  http://host/examples/servlet/HelloWorldExample

when using an apache server?

How could this be possible?  How would apache know where to find
/examples?

--
Todd Pfaff \  Email: [EMAIL PROTECTED]
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132  \  FAX: (905) 528-3773
McMaster University   \
Hamilton, Ontario, Canada  L8S 4M1 \





Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US


Hi 

I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and using mod_jserv
as connector. and using SSL.

The jsp are working perfectly, but servlets do not run at all. You get HTTP
404 document not found error.  I have tried every possible way, but none
works.

for e.g if I reference a servlet HelloWorldExample in the context of
examples

through https://server-name/examples/servlet/HelloWorldExample

i get HTTP 404 page not found

and in apache error_log I see:

File does not exist:
/myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample

However if I refernce a servlet through jsp (i forward the request to a
servlet) it gets resolved.

I will really appreciate if someone can point me how to correct this
behaviour.

All my web.xml and server.xml files are as they should be.



thanks 

Animesh



RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

Thanks Filip!!

I have the followinfg entry in my tomcat.conf file.

Alias /examples /myroot/jakarta-tomcat/webapps/examples
Directory "/myroot/jakarta-tomcat/webapps/examples
  Options Indexes FollowSymLinks
/Directory

ApJServMount /examples/servlet /examples
Location /examples/WEB-INF/ 
   AllowOverride None
   deny  from all
/Location

the same is repeated for other contexts. And this file has been included in
Apache httpd.conf file.

Please let me know where I am going wrong or what do I need to do. 

Regards

Animesh

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 11:40 AM
To: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


I would recommend switching to mod_jk
but from your problem, it does't look like you have set up the context
mapping of the /servlet context to go through mod_jserv.

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

 -Original Message-
 From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 9:35 AM
 To: '[EMAIL PROTECTED]'
 Subject: Servlets do not run under Apache-tomcat



 Hi

 I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
 using mod_jserv
 as connector. and using SSL.

 The jsp are working perfectly, but servlets do not run at all.
 You get HTTP
 404 document not found error.  I have tried every possible way, but none
 works.

 for e.g if I reference a servlet HelloWorldExample in the context of
 examples

 through https://server-name/examples/servlet/HelloWorldExample

 i get HTTP 404 page not found

 and in apache error_log I see:

 File does not exist:
 /myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample

 However if I refernce a servlet through jsp (i forward the request to a
 servlet) it gets resolved.

 I will really appreciate if someone can point me how to correct this
 behaviour.

 All my web.xml and server.xml files are as they should be.



 thanks

 Animesh




RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US


Oops typographical mistake Its apache 1.3.17 

Animesh

-Original Message-
From: Todd Pfaff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 12:38 PM
To: [EMAIL PROTECTED]
Cc: Animesh Chaturvedi - US
Subject: Re: Servlets do not run under Apache-tomcat


On Thu, 29 Mar 2001, Animesh Chaturvedi - US wrote:

 I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and using
mod_jserv
 as connector. and using SSL.

i assume you mean apache 1.3.17.

i posted a similar question yesterday to this list.  my environment is:

linux mandrake 7.2
apache 1.3.14 (mandrake build)
tomcat 3.2.1

i've tried using mod_jserv_tomcat and mod_jk.
when i use mod_jserv_tomcat, something is crashing with a segv.
when i use mod_jk, apache logs an error similar to yours:
File does not exist:
/usr/local/jakarta-tomcat-3.2.1/webapps/examples/servlet/HelloWorldExample

can anyone who is successfully running a linux, apache, tomcat environment
please send us the details of your environment, including:
- versions of linux, apache, tomcat
- copies of
  - your apache httpd.conf
  - your tomcat apache config files
mod_jk.conf-auto
tomcat-apache.conf
- did you build apache and/or tomcat from source
or did you use the binaries from jakarta.apache.org?


 The jsp are working perfectly, but servlets do not run at all. You get
HTTP
 404 document not found error.  I have tried every possible way, but none
 works.
 
 for e.g if I reference a servlet HelloWorldExample in the context of
 examples
 
 through https://server-name/examples/servlet/HelloWorldExample
 
 i get HTTP 404 page not found
 
 and in apache error_log I see:
 
 File does not exist:
 /myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample
 
 However if I refernce a servlet through jsp (i forward the request to a
 servlet) it gets resolved.
 
 I will really appreciate if someone can point me how to correct this
 behaviour.
 
 All my web.xml and server.xml files are as they should be.
 
 
 
 thanks 
 
 Animesh
 

--
Todd Pfaff \  Email: [EMAIL PROTECTED]
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132  \  FAX: (905) 528-3773
McMaster University   \
Hamilton, Ontario, Canada  L8S 4M1 \




RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

Yeah Filip

I agree but why is it not serving my servlet.

The HelloWorldExample Servlet's .class file is placed in
/myroot/jakarta-tomcat/webapps/examples/WEB-INF/classes folder

So if I point my browser to
https://server-name/examples/servlet/HelloWorldExample  it should run the
HelloWorldExample servlet. The jsps in examples context are running fine
without problem.

Also if in a jsp in the examples context i put jsp:forward
page="/servlet/HelloWorldExample" / and refernce the jsp it works.

So whats going wrong. Any idea???


Animesh



-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 1:33 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


 Alias /examples /myroot/jakarta-tomcat/webapps/examples
 Directory "/myroot/jakarta-tomcat/webapps/examples
   Options Indexes FollowSymLinks
 /Directory

 ApJServMount /examples/servlet /examples
 Location /examples/WEB-INF/ 
AllowOverride None
deny  from all
 /Location

this looks like anything that goes to
/examples/servlet is being sent /examples which is being aliased to
/myroot/jakarta-tomcat/webapps/examples file system

agree?
Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

 -Original Message-
 From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 9:58 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Servlets do not run under Apache-tomcat


 Thanks Filip!!

 I have the followinfg entry in my tomcat.conf file.

 Alias /examples /myroot/jakarta-tomcat/webapps/examples
 Directory "/myroot/jakarta-tomcat/webapps/examples
   Options Indexes FollowSymLinks
 /Directory

 ApJServMount /examples/servlet /examples
 Location /examples/WEB-INF/ 
AllowOverride None
deny  from all
 /Location

 the same is repeated for other contexts. And this file has been
 included in
 Apache httpd.conf file.

 Please let me know where I am going wrong or what do I need to do.

 Regards

 Animesh

 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 11:40 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlets do not run under Apache-tomcat


 I would recommend switching to mod_jk
 but from your problem, it does't look like you have set up the context
 mapping of the /servlet context to go through mod_jserv.

 Filip

 ~
 Namaste - I bow to the divine in you
 ~
 Filip Hanik
 Software Architect
 [EMAIL PROTECTED]
 www.filip.net

  -Original Message-----
  From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 29, 2001 9:35 AM
  To: '[EMAIL PROTECTED]'
  Subject: Servlets do not run under Apache-tomcat
 
 
 
  Hi
 
  I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
  using mod_jserv
  as connector. and using SSL.
 
  The jsp are working perfectly, but servlets do not run at all.
  You get HTTP
  404 document not found error.  I have tried every possible way, but none
  works.
 
  for e.g if I reference a servlet HelloWorldExample in the context of
  examples
 
  through https://server-name/examples/servlet/HelloWorldExample
 
  i get HTTP 404 page not found
 
  and in apache error_log I see:
 
  File does not exist:
  /myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample
 
  However if I refernce a servlet through jsp (i forward the request to a
  servlet) it gets resolved.
 
  I will really appreciate if someone can point me how to correct this
  behaviour.
 
  All my web.xml and server.xml files are as they should be.
 
 
 
  thanks
 
  Animesh
 




RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

I am using tomcat1.3.17 that only supports mod_jserv not mod_jk. So the
tomcat-apche.conf file thats generated automatically by tomcat 1.3.17 should
have created Directives that are correct for mod_jserv.

Do you mean to say that the Directives I have used in my Tomcat.conf file
are not correct? If not what should they be?

Animesh



-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 1:55 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


yeah, but you can't mix mod_jk configurations with the mod_jserv module.
the auto conf files are created for mod_jk,
ApJServMount /examples/servlet /examples
this command is for mod_jserv

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

 -Original Message-
 From: Todd Pfaff [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 11:46 AM
 To: [EMAIL PROTECTED]
 Cc: Filip Hanik
 Subject: RE: Servlets do not run under Apache-tomcat


 yes, i agree, that's what it looks like, but this is *exactly* how tomcat
 creates the tomcat-apache.conf and mod_jk.conf-auto when it starts up.
 are those auto-created conf files know to be incorrect?

 On Thu, 29 Mar 2001, Filip Hanik wrote:

   Alias /examples /myroot/jakarta-tomcat/webapps/examples
   Directory "/myroot/jakarta-tomcat/webapps/examples
 Options Indexes FollowSymLinks
   /Directory
  
   ApJServMount /examples/servlet /examples
   Location /examples/WEB-INF/ 
  AllowOverride None
  deny  from all
   /Location
 
  this looks like anything that goes to
  /examples/servlet is being sent /examples which is being aliased to
  /myroot/jakarta-tomcat/webapps/examples file system
 
  agree?
  Filip
 
  ~
  Namaste - I bow to the divine in you
  ~
  Filip Hanik
  Software Architect
  [EMAIL PROTECTED]
  www.filip.net
 
   -Original Message-
   From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 29, 2001 9:58 AM
   To: '[EMAIL PROTECTED]'
   Subject: RE: Servlets do not run under Apache-tomcat
  
  
   Thanks Filip!!
  
   I have the followinfg entry in my tomcat.conf file.
  
   Alias /examples /myroot/jakarta-tomcat/webapps/examples
   Directory "/myroot/jakarta-tomcat/webapps/examples
 Options Indexes FollowSymLinks
   /Directory
  
   ApJServMount /examples/servlet /examples
   Location /examples/WEB-INF/ 
  AllowOverride None
  deny  from all
   /Location
  
   the same is repeated for other contexts. And this file has been
   included in
   Apache httpd.conf file.
  
   Please let me know where I am going wrong or what do I need to do.
  
   Regards
  
   Animesh
  
   -Original Message-
   From: Filip Hanik [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 29, 2001 11:40 AM
   To: [EMAIL PROTECTED]
   Subject: RE: Servlets do not run under Apache-tomcat
  
  
   I would recommend switching to mod_jk
   but from your problem, it does't look like you have set up the context
   mapping of the /servlet context to go through mod_jserv.
  
   Filip
  
   ~
   Namaste - I bow to the divine in you
   ~
   Filip Hanik
   Software Architect
   [EMAIL PROTECTED]
   www.filip.net
  
-Original Message-
From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 9:35 AM
To: '[EMAIL PROTECTED]'
Subject: Servlets do not run under Apache-tomcat
   
   
   
Hi
   
I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
using mod_jserv
as connector. and using SSL.
   
The jsp are working perfectly, but servlets do not run at all.
You get HTTP
404 document not found error.  I have tried every possible
 way, but none
works.
   
for e.g if I reference a servlet HelloWorldExample in the context of
examples
   
through https://server-name/examples/servlet/HelloWorldExample
   
i get HTTP 404 page not found
   
and in apache error_log I see:
   
File does not exist:
/myroot/jakarta-tomcat/webapps/examples/servlet/HelloWorldExample
   
However if I refernce a servlet through jsp (i forward the
 request to a
servlet) it gets resolved.
   
I will really appreciate if someone can point me how to correct this
behaviour.
   
All my web.xml and server.xml files are as they should be.
   
   
   
thanks
   
Animesh
   
  
 
 

 --
 Todd Pfaff \  Email: [EMAIL PROTECTED]
 Computing and Information Services  \ Voice: (905) 525-9140 x22920
 ABB 132  \  FAX: (905) 528-3773
 McMaster University   \
 Hamilton, Ontario, Canada  L8S 4M1 \





RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

Hey I am really sorry for making typo mistakes. 

I mean that tomcat 3.1.1 only supports mod_jserv. I am not using mod_jk. I
am not using tomcat 3.2.1 rather tomcat 3.1.1, apache 1.3.17 and mod_jserv.


Animesh

-Original Message-
From: Todd Pfaff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 2:38 PM
To: '[EMAIL PROTECTED]'
Cc: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


On Thu, 29 Mar 2001, Animesh Chaturvedi - US wrote:

 I am using tomcat1.3.17 that only supports mod_jserv not mod_jk. So the
 tomcat-apche.conf file thats generated automatically by tomcat 1.3.17
should
 have created Directives that are correct for mod_jserv.
 
 Do you mean to say that the Directives I have used in my Tomcat.conf file
 are not correct? If not what should they be?
 
 Animesh

Animesh,

Another typo in your version numbers...

apache-1.3.17
tomcat-3.2.1

Correct?  I'm just trying to avoid more confusion than we already have.

And what do you mean "only supports mod_jserv"?  Do you just mean that
you're not using mod_jk, or are you under the impression that tomcat-3.2.1
does not support mod_jk?

Todd

--
Todd Pfaff \  Email: [EMAIL PROTECTED]
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132  \  FAX: (905) 528-3773
McMaster University   \
Hamilton, Ontario, Canada  L8S 4M1 \




RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

Hi Filip

I tried removing the alias directive. It did not work because then it starts
looking into DocumentRoot which has been set to apache-home/htdocs and it
does not find the file there since its not there.

I have tried every combination in tomcat.conf file. It seems that /servlet
requests do not reach tomcat atall. It looks for the servlet just like a
normal file in the file hiearchy  and does not invoke it.

Hey I am really clueless about this can anyone help me out..

regards

Animesh



-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 2:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


 Also if in a jsp in the examples context i put jsp:forward
 page="/servlet/HelloWorldExample" / and refernce the jsp it works.
this works because Apache nor mod_jserv is involved, this is an internal
Tomcat operation

 So if I point my browser to
 https://server-name/examples/servlet/HelloWorldExample  it should run the
 HelloWorldExample servlet. The jsps in examples context are running fine
 without problem.

you have to look up the documentation for mod_jserv. If switching to mod_jk
is not an option (and Apache 1.3.17 does support mod_jk, hell we used apache
1.3.14 for mod_jk:),
I can help you do the research, but the docs are pretty detailed.
they even walk you through some examples

but I can't seem to find the docs I once used, and that is probably because
mod_jk is much more widely used.
read the $TOMCAT_HOME/doc/uguide/tomcat_ug.html for the AjpServMount
directive.

Also, try to remove the Alias directive, and see if that will work

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

 -Original Message-----
 From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 11:53 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Servlets do not run under Apache-tomcat


 Yeah Filip

 I agree but why is it not serving my servlet.

 The HelloWorldExample Servlet's .class file is placed in
 /myroot/jakarta-tomcat/webapps/examples/WEB-INF/classes folder

 So if I point my browser to
 https://server-name/examples/servlet/HelloWorldExample  it should run the
 HelloWorldExample servlet. The jsps in examples context are running fine
 without problem.



 So whats going wrong. Any idea???


 Animesh



 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 1:33 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlets do not run under Apache-tomcat


  Alias /examples /myroot/jakarta-tomcat/webapps/examples
  Directory "/myroot/jakarta-tomcat/webapps/examples
Options Indexes FollowSymLinks
  /Directory
 
  ApJServMount /examples/servlet /examples
  Location /examples/WEB-INF/ 
 AllowOverride None
 deny  from all
  /Location

 this looks like anything that goes to
 /examples/servlet is being sent /examples which is being aliased to
 /myroot/jakarta-tomcat/webapps/examples file system

 agree?
 Filip

 ~
 Namaste - I bow to the divine in you
 ~
 Filip Hanik
 Software Architect
 [EMAIL PROTECTED]
 www.filip.net

  -Original Message-
  From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 29, 2001 9:58 AM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Servlets do not run under Apache-tomcat
 
 
  Thanks Filip!!
 
  I have the followinfg entry in my tomcat.conf file.
 
  Alias /examples /myroot/jakarta-tomcat/webapps/examples
  Directory "/myroot/jakarta-tomcat/webapps/examples
Options Indexes FollowSymLinks
  /Directory
 
  ApJServMount /examples/servlet /examples
  Location /examples/WEB-INF/ 
 AllowOverride None
 deny  from all
  /Location
 
  the same is repeated for other contexts. And this file has been
  included in
  Apache httpd.conf file.
 
  Please let me know where I am going wrong or what do I need to do.
 
  Regards
 
  Animesh
 
  -Original Message-
  From: Filip Hanik [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 29, 2001 11:40 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Servlets do not run under Apache-tomcat
 
 
  I would recommend switching to mod_jk
  but from your problem, it does't look like you have set up the context
  mapping of the /servlet context to go through mod_jserv.
 
  Filip
 
  ~
  Namaste - I bow to the divine in you
  ~
  Filip Hanik
  Software Architect
  [EMAIL PROTECTED]
  www.filip.net
 
   -Original Message-----
   From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 29, 2001 9:35 AM
   To: '[EMAIL PROTECTED]'
   Subject: Servlets do not run under Apache-tomcat
  
  
  
   Hi
  
   I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
   using mod_jserv
   as connector. and using SSL.
  
   The jsp are working perfectly, but servlets do not run at all.
   You get HTTP
   404 document not found error.  I have tried every possible
 way, but none
   works

Hey I found the solution RE: Servlets do not run under Apache-tomcat

2001-03-29 Thread Animesh Chaturvedi - US

Hi filip 

I found the solution. You have to make a change in tomcat's server.xml file.
In the ContextManager section you have to set up a variable like
home="TOMCAT_HOME".

Now you do  not need to use an Alias directive they all will work.

Animesh

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 2:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Servlets do not run under Apache-tomcat


 Also if in a jsp in the examples context i put jsp:forward
 page="/servlet/HelloWorldExample" / and refernce the jsp it works.
this works because Apache nor mod_jserv is involved, this is an internal
Tomcat operation

 So if I point my browser to
 https://server-name/examples/servlet/HelloWorldExample  it should run the
 HelloWorldExample servlet. The jsps in examples context are running fine
 without problem.

you have to look up the documentation for mod_jserv. If switching to mod_jk
is not an option (and Apache 1.3.17 does support mod_jk, hell we used apache
1.3.14 for mod_jk:),
I can help you do the research, but the docs are pretty detailed.
they even walk you through some examples

but I can't seem to find the docs I once used, and that is probably because
mod_jk is much more widely used.
read the $TOMCAT_HOME/doc/uguide/tomcat_ug.html for the AjpServMount
directive.

Also, try to remove the Alias directive, and see if that will work

Filip

~
Namaste - I bow to the divine in you
~
Filip Hanik
Software Architect
[EMAIL PROTECTED]
www.filip.net

 -Original Message-
 From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 11:53 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Servlets do not run under Apache-tomcat


 Yeah Filip

 I agree but why is it not serving my servlet.

 The HelloWorldExample Servlet's .class file is placed in
 /myroot/jakarta-tomcat/webapps/examples/WEB-INF/classes folder

 So if I point my browser to
 https://server-name/examples/servlet/HelloWorldExample  it should run the
 HelloWorldExample servlet. The jsps in examples context are running fine
 without problem.



 So whats going wrong. Any idea???


 Animesh



 -Original Message-
 From: Filip Hanik [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 29, 2001 1:33 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Servlets do not run under Apache-tomcat


  Alias /examples /myroot/jakarta-tomcat/webapps/examples
  Directory "/myroot/jakarta-tomcat/webapps/examples
Options Indexes FollowSymLinks
  /Directory
 
  ApJServMount /examples/servlet /examples
  Location /examples/WEB-INF/ 
 AllowOverride None
 deny  from all
  /Location

 this looks like anything that goes to
 /examples/servlet is being sent /examples which is being aliased to
 /myroot/jakarta-tomcat/webapps/examples file system

 agree?
 Filip

 ~
 Namaste - I bow to the divine in you
 ~
 Filip Hanik
 Software Architect
 [EMAIL PROTECTED]
 www.filip.net

  -Original Message-
  From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 29, 2001 9:58 AM
  To: '[EMAIL PROTECTED]'
  Subject: RE: Servlets do not run under Apache-tomcat
 
 
  Thanks Filip!!
 
  I have the followinfg entry in my tomcat.conf file.
 
  Alias /examples /myroot/jakarta-tomcat/webapps/examples
  Directory "/myroot/jakarta-tomcat/webapps/examples
Options Indexes FollowSymLinks
  /Directory
 
  ApJServMount /examples/servlet /examples
  Location /examples/WEB-INF/ 
 AllowOverride None
 deny  from all
  /Location
 
  the same is repeated for other contexts. And this file has been
  included in
  Apache httpd.conf file.
 
  Please let me know where I am going wrong or what do I need to do.
 
  Regards
 
  Animesh
 
  -Original Message-
  From: Filip Hanik [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, March 29, 2001 11:40 AM
  To: [EMAIL PROTECTED]
  Subject: RE: Servlets do not run under Apache-tomcat
 
 
  I would recommend switching to mod_jk
  but from your problem, it does't look like you have set up the context
  mapping of the /servlet context to go through mod_jserv.
 
  Filip
 
  ~
  Namaste - I bow to the divine in you
  ~
  Filip Hanik
  Software Architect
  [EMAIL PROTECTED]
  www.filip.net
 
   -Original Message-----
   From: Animesh Chaturvedi - US [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, March 29, 2001 9:35 AM
   To: '[EMAIL PROTECTED]'
   Subject: Servlets do not run under Apache-tomcat
  
  
  
   Hi
  
   I am running Apache 3.1.17 and Tomcat3.2.1 on a unix box and
   using mod_jserv
   as connector. and using SSL.
  
   The jsp are working perfectly, but servlets do not run at all.
   You get HTTP
   404 document not found error.  I have tried every possible
 way, but none
   works.
  
   for e.g if I reference a servlet HelloWorldExample in the context of
   examples
  
   through https://server-name/examples/servlet/HelloWorldExample
  
   i get HTTP 404 page not found
  
   and in apache error_log I see:
  
   F