Re: Newbie - 500 Error

2001-07-10 Thread Dmitri Colebatch

On Tue, 10 Jul 2001 16:21, Phillip Gillis wrote:
 So I take it the directory structure is critical :-)
Yep... have a look at the servlet 2.2 spec - coming from an asp world I'm 
guessing you're not familiar with the way java works - but basically almost 
everything you deal with in java will conform to some spec.  The spec holds 
the rulebook - that way you can stop using one vendor's product and start 
using anothers'.  (notice M$ doesn't do this (o:  ... sorry - couldn't 
resist)...
http://java.sun.com/products/servlet - the spec is in there somewhere, 
tomcat 3.x support version 2.2 and 4.0 is aiming at 2.3.  I'd start with 2.2 
if I were you.

 Again I am new to this . .a last question if you dont mind .

 If I were really wanting to house it in my wwwroot directory, couldn't I
 keep the same phil structure, and modify my Context path statement? Also,
 do I have to reompile class files everytime I move them to a new location?
yep - absolutely.  but if you're wanting to integrate with IIS (I'm assuming 
thats faster than tomcat with static pages) then read the IIS howto.  I'm a 
linux user so have no idea about the IIS stuff sorry.  but if on the other 
hand all you want to do is use a familiar environment, then yeah, you can 
have the context docBase as an absolute path... eg C:/wwwroot/phil.

one last thing from me... when replying - keep it on the list, that way 
someone else having the same questions can search the archives first (o:

cheers
dim



 Thanks again!!!

 Phil


 - Original Message -
 From: Dmitri Colebatch [EMAIL PROTECTED]
 To: Phillip Gillis [EMAIL PROTECTED]
 Cc: Phillip L. Gillis [EMAIL PROTECTED]
 Sent: Tuesday, July 10, 2001 1:20 AM
 Subject: Re: Newbie - 500 Error

  ahh, no... here's your problem
 
   Context path=/phil
docBase=webapps/phil/jsp
 
  ^
 
crossContext=false
debug=0
reloadable=true 
   /Context
 
  It should be webapps/phil  your requesting
  http://localhost:8080/phil/jsp/dates.jsp right?  The WEB-INF directory

 should

  exist in the docBase directory.  You dont have this atm right?
 
  try that (o:
 
  cheers
  dim
 
I have the following directory structure:
  
webapss
--phil
   --jsp
   --WEB-INF
  
   the jsp directory has date.jsp (copy of the examples file)
   the WEB-INF directory has a subdirectory named classes, inside classes

 is a

   sub directory named dates, inside dates is my JspCalendar.java. Opening

 it

   in JPad and compiling puts the class file in the same directory:
  
Compiling

 C:\jakarta-tomcat-3.2.1\webapps\phil\WEB-INF\classes\dates\JspCalendar.java

   Finished
  
   calling http://localhost:8080/phil/date.jsp in the browser still gives

 me:
   org.apache.jasper.JasperException: Unable to load class

 dates.JspCalendar

   My CLASSPATH is .;C:\jdk1.1.8\bin
   My JAVA_HOME is c:\jdk1.1.8
   ;C:\jdk1.1.8\bin was appended to my PATH
   My TOMCAT_HOME is c:\jakarta-tomcat-3.2.1
  
  
   I am baffled.
  
   phil
  
  
  
  
  
   - Original Message -
   From: Dmitri Colebatch [EMAIL PROTECTED]
   To: Phillip Gillis [EMAIL PROTECTED];
   [EMAIL PROTECTED]
   Sent: Tuesday, July 10, 2001 12:55 AM
   Subject: Re: Newbie - 500 Error
  
Phil,
   
Ok - you're using the

 %TOMCAT_HOME%\webapps\examples\jsp\dates\dates.jsp?

The line you're interested in is
   
jsp:useBean id='clock' scope='page' class='dates.JspCalendar'
type=dates.JspCalendar /
   
This is more of a general java question rather than tomcat (assuming

 I'm

understanding you correctly, so forgive me if I appear patronizing
(o: ).
   
What the jsp:useBean does is try to create an object of type
dates.JspCalendar.  This object is said to exist in a package

 dates

   and
  
be called JspCalendar.  As such, tomcat will assume it exists in
the directory webapps\phil\WEB-INF\classes\dates\ - now if I read

 correectly

you've put it in the classes dir.  When you compile, you shouldn't

 move

   files
  
around yourself... do something like
   
javac -d %TOMCAT_HOME%\webapps\phil\WEB-INF\classes JspCalendar.java

 and

you'll see that javac puts it in the correct place.  This it
basically the way CLASSPATH operates in java...
   
this should do the trick.
   
cheesr
dim
   
On Tue, 10 Jul 2001 15:39, Phillip Gillis wrote:
 Thank you for your reply . .
 In my directory Phil I created a WEB-INF subdirectory, in it I
 created
  
   a
  
 sub directory named classes . inside the classes directory, I

 placed

   the
  
 JSPCalendar class which from my error is what won't load, I also

 placed

   the
  
 associated .java file in the clsses directory. Using JPad, I

 recompiled

 this with no errors replacing the previously copied class file.
 In my Server.xml file, I now just have a Host 

Re: Newbie - 500 Error

2001-07-10 Thread Phillip Gillis

Thank you so much for your help. I know I jumped the gun and asked before I
thoroughly researched . However, I was and am very anxious to begin my
conversions . .and I think I understand the particular syntax I am looking
at . . but I was oblivious to the spec and set-up. I will now go back to the
drawing board and learn this correctly. The goal certainly is not to use IIS
for production, but these are the only machines we have for development. It
is nice to know that I can actually pursue it on the Win platform though to
be honest.
It is very satisfying to know that people like you and others on this list
contribute your time and knowledge. I cannot say thanks enough. Perhaps
someday I can help you back . .perhaps I can remind you if you'd like fries
with your burger or something

:-)

thanks again.

Phil


- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: Phillip Gillis [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 1:36 AM
Subject: Re: Newbie - 500 Error


 On Tue, 10 Jul 2001 16:21, Phillip Gillis wrote:
  So I take it the directory structure is critical :-)
 Yep... have a look at the servlet 2.2 spec - coming from an asp world I'm
 guessing you're not familiar with the way java works - but basically
almost
 everything you deal with in java will conform to some spec.  The spec
holds
 the rulebook - that way you can stop using one vendor's product and start
 using anothers'.  (notice M$ doesn't do this (o:  ... sorry - couldn't
 resist)...
 http://java.sun.com/products/servlet - the spec is in there somewhere,
 tomcat 3.x support version 2.2 and 4.0 is aiming at 2.3.  I'd start with
2.2
 if I were you.

  Again I am new to this . .a last question if you dont mind .
 
  If I were really wanting to house it in my wwwroot directory, couldn't I
  keep the same phil structure, and modify my Context path statement?
Also,
  do I have to reompile class files everytime I move them to a new
location?
 yep - absolutely.  but if you're wanting to integrate with IIS (I'm
assuming
 thats faster than tomcat with static pages) then read the IIS howto.  I'm
a
 linux user so have no idea about the IIS stuff sorry.  but if on the other
 hand all you want to do is use a familiar environment, then yeah, you can
 have the context docBase as an absolute path... eg C:/wwwroot/phil.

 one last thing from me... when replying - keep it on the list, that way
 someone else having the same questions can search the archives first (o:

 cheers
 dim


 
  Thanks again!!!
 
  Phil
 
 
  - Original Message -
  From: Dmitri Colebatch [EMAIL PROTECTED]
  To: Phillip Gillis [EMAIL PROTECTED]
  Cc: Phillip L. Gillis [EMAIL PROTECTED]
  Sent: Tuesday, July 10, 2001 1:20 AM
  Subject: Re: Newbie - 500 Error
 
   ahh, no... here's your problem
  
Context path=/phil
 docBase=webapps/phil/jsp
  
   ^
  
 crossContext=false
 debug=0
 reloadable=true 
/Context
  
   It should be webapps/phil  your requesting
   http://localhost:8080/phil/jsp/dates.jsp right?  The WEB-INF directory
 
  should
 
   exist in the docBase directory.  You dont have this atm right?
  
   try that (o:
  
   cheers
   dim
  
 I have the following directory structure:
   
 webapss
 --phil
--jsp
--WEB-INF
   
the jsp directory has date.jsp (copy of the examples file)
the WEB-INF directory has a subdirectory named classes, inside
classes
 
  is a
 
sub directory named dates, inside dates is my JspCalendar.java.
Opening
 
  it
 
in JPad and compiling puts the class file in the same directory:
   
 Compiling
 
 
C:\jakarta-tomcat-3.2.1\webapps\phil\WEB-INF\classes\dates\JspCalendar.java
 
Finished
   
calling http://localhost:8080/phil/date.jsp in the browser still
gives
 
  me:
org.apache.jasper.JasperException: Unable to load class
 
  dates.JspCalendar
 
My CLASSPATH is .;C:\jdk1.1.8\bin
My JAVA_HOME is c:\jdk1.1.8
;C:\jdk1.1.8\bin was appended to my PATH
My TOMCAT_HOME is c:\jakarta-tomcat-3.2.1
   
   
I am baffled.
   
phil
   
   
   
   
   
- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: Phillip Gillis [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 12:55 AM
Subject: Re: Newbie - 500 Error
   
 Phil,

 Ok - you're using the
 
  %TOMCAT_HOME%\webapps\examples\jsp\dates\dates.jsp?
 
 The line you're interested in is

 jsp:useBean id='clock' scope='page' class='dates.JspCalendar'
 type=dates.JspCalendar /

 This is more of a general java question rather than tomcat
(assuming
 
  I'm
 
 understanding you correctly, so forgive me if I appear patronizing
 (o: ).

 What the jsp:useBean does is try to create an object of type
 dates.JspCalendar.  This object is said to 

Re: Newbie - 500 Error

2001-07-10 Thread Dmitri Colebatch

Phil,

The way most ppl use tomcat (in production systems) is to have apache or IIS 
server static content and only use tomcat for serving jsps and servlets.  So 
when you do get down the road of going live etc, I'd advise you _do_ use IIS 
_as well_ as tomcat - each for what they're intended for.

On Tue, 10 Jul 2001 16:39, Phillip Gillis wrote:
  .perhaps I can remind you if you'd like fries
 with your burger or something
geez... be careful making offers like that (o:   how about you answer that 
question next time it comes up and that'll be just fine (o:

cheers again 
dim




Re: Newbie - 500 Error

2001-07-10 Thread Phillip Gillis

points well taken!!

Phil

- Original Message -
From: Dmitri Colebatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Phillip Gillis
[EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 1:51 AM
Subject: Re: Newbie - 500 Error


 Phil,

 The way most ppl use tomcat (in production systems) is to have apache or
IIS
 server static content and only use tomcat for serving jsps and servlets.
So
 when you do get down the road of going live etc, I'd advise you _do_ use
IIS
 _as well_ as tomcat - each for what they're intended for.

 On Tue, 10 Jul 2001 16:39, Phillip Gillis wrote:
   .perhaps I can remind you if you'd like fries
  with your burger or something
 geez... be careful making offers like that (o:   how about you answer that
 question next time it comes up and that'll be just fine (o:

 cheers again
 dim





RE: jk_nt_service -- where exactly is it?

2001-07-10 Thread GOMEZ Henri

JK_NT_SERVICE is present on mod_jk and you'll find 
up to date versions on jakarta-tomcat-connectors
sub-project.

All remarks and contributions will be welcome :)

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


-Original Message-
From: Bruce A. Carson [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 5:51 PM
To: [EMAIL PROTECTED]
Subject: RE: jk_nt_service -- where exactly is it?


I have not dealt with the Sourcecode (yet)...I assumed that it was contained
with the jakarta Source...An easy way to check would be to look at the
Makefile.win32 to see if that target is available??

Bruce
-Original Message-
From: Michael Weir (Transform Research) [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 11:36 AM
To: '[EMAIL PROTECTED]'
Subject: RE: jk_nt_service -- where exactly is it?


Thanks, Bruce.  Any idea where the source code is?
MW 
-Original Message-
From: Bruce A. Carson [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 9:44 AM
To: [EMAIL PROTECTED]
Subject: RE: jk_nt_service -- where exactly is it?


Try:
  
http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3-m4/bin/win32/i3
86/
Cheers!
Bruce
-Original Message-
From: Michael Weir (Transform Research) [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 9:21 AM
To: '[EMAIL PROTECTED]'
Subject: jk_nt_service -- where exactly is it?


I've read about using jk_nt_service to run Tomcat as an NT Service but where
exactly can this be downloaded from?

Thanks,
Michael Weir



RE: mod_jserv/mod_jk

2001-07-10 Thread GOMEZ Henri

ya but i need to get the .so file also as i want to put it on HP-UX.
.h files are missing ...


Could I recommand you grab jakarta-tomcat-connectors CVS and use
the new build system. It's using autoconf and let you build your
stuff in minutes :)




RE: mod_webapp.so

2001-07-10 Thread GOMEZ Henri

p.d.: what is  the difference  between mod_jk and 
mod_webapp?(It is The 
version of tomcat?)

mod_jk is the current reference for connecting a 
web-server (Apache 1.3/2.0, IIS, iPlanet, Domino, ...) to
tomcat web-server. It supports load-balancing and all
the Tomcat release 3.1/3.2/3.3/4.0

mod_webapp only support Tomcat 4.0 since there is not yet 
(and probably never) a warp (webapp protocol) adapter for 
TC 3.2/3.3

Just take a look at jakarta-tomcat-connectors sub-project
which contains both !)




 



RE: Why does Tomcat spend too much time before process a request?

2001-07-10 Thread Vicente Martínez

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Re: Why does Tomcat spend too much time before process a request?Hi,

explaining more in detail the tests we've made ...

We have tested with a max number of concurrent clients of 100 running 100
seconds.

We have tested with SPoolTcpConnector  SimpleTcpConnector
We have also used Ajp12  Ajp13 (we've seen better performance with Ajp13,
but not in the time we're measuring)
To time this we've used snoop  Servlets that write timestamp.

The issue is to know if there is any configuration parameter of tomcat to
reduce this time.

For example, in one execution, the average execution time of all Servlets
was 48.47 seconds, and the average D time was 23.067 seconds, almost 50%.

Thanks for your answer, David.
  -Mensaje original-
  De: David Cassidy (Programmer) [mailto:[EMAIL PROTECTED]]
  Enviado el: lunes, 09 de julio de 2001 15:03
  Para: [EMAIL PROTECTED]
  Asunto: Re: Why does Tomcat spend too much time before process a request?


  Vicente,

  You say under stress conditions how many hits are you
  doing on tomcat at the same time ?

  In server.xml what have you got these set to ...



  Connector className=org.apache.tomcat.service.PoolTcpConnector
  Parameter name=handler
  value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/
  Parameter name=port value=8007/
  Parameter name=max_threads value=10/
  Parameter name=max_spare_threads value=7/
  Parameter name=min_spare_threads value=3 /
  /Connector

  I've only got 10 threads here - you might want more :)

  How many threads have you got tomcat running ?

  Are you using ajp12 or ajp13 ?

  What are you using to time this ??

  David

  Vicente Martínez wrote:
  
   -BEGIN PGP SIGNED MESSAGE-
   Hash: SHA1
  
   Hi everybody,
  
   We have tested Tomcat under stress conditions, to see how it works
   handling
   hundreds of concurrent requests.
  
   Our system is using Apache as static content server and tomcat as
   dynamic
   content server (jsp  servlet)
  
   We have measured ...
  
   A. the time the request takes to go from the client to the Apache
   server.
   B. the time the request is in Apache server before an Apache process
   gets
   it.
   C. the time an Apache process takes to redirect the request to Tomcat
   server.
   D. the time the request is in Tomcat server before a Tomcat process
gets
   it.
   E. then time a Tomcat process takes to send back the request to Apache
   ... and so on until the request arrives to the client.
  
   What we have seen is that tomcat is spending a big amount of time (say
   36%)
   in step D.
  
   and now the questions?
  
   Is Tomcat prepared to handle a big number of concurrent requests?
   How big can be that number?
  
   Is there any way to configure Tomcat, in order to reduce the time we
   have
   seen in step D?
  
   Thanks,
  
   
  
 Vicente Martínez Martínez / [EMAIL PROTECTED]
   
  
   -BEGIN PGP SIGNATURE-
   Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com
  
   iQA/AwUBO0l/RexS7D2tCBWMEQKvbgCgmymxo6hMYHHE0LL3ixNiRjVLsxEAoMy2
   cHABYZdgaa3dSz36xky1IpV5
   =rieG
   -END PGP SIGNATURE-


-BEGIN PGP SIGNATURE-
Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com

iQA/AwUBO0qmguxS7D2tCBWMEQKD4QCgtUhnEjzDfgtLeintWGNrrP8RjW0AoO7P
dtnro/8M7lkEBcGJreBE4XF1
=kpfY
-END PGP SIGNATURE-




RE: mod_jk.so-eapi vs mod_jk.so-noeapi

2001-07-10 Thread GOMEZ Henri

mod_jk.so-eapi is to be used when your apache is using EAPI (mod_ssl)
mod_jk.so-noeapi when using plain std Apache

:)


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



-Original Message-
From: Vinay Menon [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 11:28 PM
To: Tomcat Dev; Tomcat User
Subject: mod_jk.so-eapi vs mod_jk.so-noeapi


What exactly are these 2 so's? Why 2 of them and which one 
should one use?

Would appreciate if somebody could let me know!

Thanks

Vinay




Re: Tomcat as NT service.. problem.

2001-07-10 Thread Tomeu Bennàssar

I had the same problem and Randy Layman send me the text bellow, try it, it
worked for me

Generally this is due to some form of Path error causing the service
not to be able to start.  There are three things to check:
1.  The path to wrapper.properties is correct (its in the registry
under HKEY_LOCAL_MACHINE\Services\CurrentControlSet\Service Name.
2.  The values of TOMCAT_HOME or JAVA_HOME are incorrect
3.  You have installed Tomcat or Java into a directory that has a
space in its name.

Tomeu Bennàssar

Simon Mitchell bpc wrote:

 I had the same problem.

 In my case it was fixed by setting  wrapper.tomcat_home, java_home
 adding the jar files for tomcat and oracle in wrapper.properties

 wrapper.tomcat_home=c:\jakarta\jakarta-tomcat-3.2.2

 wrapper.java_home=c:\jdk1.3

 wrapper.class_path=$(wrapper.tomcat_home)\classes
 wrapper.class_path=$(wrapper.tomcat_home)\lib\japx.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\parser.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\webserver.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\servlet.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\jasper.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\classes12.jar
 wrapper.class_path=$(wrapper.tomcat_home)\lib\nls_charset12.jar

 Good Luck.
 Regards,
 Simon

 Gregory Guthrie wrote:

  I tried to setup Tomcat to start as an NT service (Win2k-Pro), as per:
Working with the Jakarta NT Service
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html
 
  And it seems OK:
 E:\Net\Apache\Toolsjk_nt_service -i Tomcat
  e:\Net\Apache\Tomcat\conf\wrapper.properties
 Asked (and given) winsock 1.1
 The service named Tomcat was created. Now adding registry entries
 Registry values were added
 If you have already updated wrapper.properties you may start the
  Tomcat service
 by executing net start Tomcat from the command prompt
 
  But I get:
 E:\Net\Apache\Toolsnet start Tomcat
 The Tomcat service is starting.
 The Tomcat service could not be started.
 The service did not report an error.
 More help is available by typing NET HELPMSG 3534.
 
  Apache runs fine as a service.  :-)
  Tomcat runs fine by a DOS startup.
  And they run fine together via mod_jk.dll.
 
  I did edit the wrappers.properties file to point to JDK and Tomcat;
  seems simple enough.
 
  Any help appreciated; I don't know where to look for hints, there are
  no log files or errors generated.
 
  
  Gregory Guthrie
  [EMAIL PROTECTED] (641)472-1125Fax: -1103
  




RE: Tomcat as NT service.. problem.

2001-07-10 Thread Randy Layman


I would suggest that you investigate why this is before you call it
a secret trap and stupid.  There are lots of little gottchas like this
in Tomcat (and Windows in general).  They are generally there because the
people at Microsoft couldn't be bothered to make all things work all the
time.

Randy

PS This problem is related to the reason that on NT and 9x you system
directory has hundreds, if not thousands, of dlls.

-Original Message-
From: Bruce A. Carson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:44 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat as NT service.. problem.


Ah, you probably fell for the secret trap laid for you by the
programmers...  The stupid Tomcat jk_nt_service can't handle directories
with a space in them and the default install for Apache puts Apache in a
directory with not one, but two spaces !!
 
I will send you my install directions in a private e-mail.  If anyone else
is interested, drop me an e-mail.
 
Bruce
-Original Message-
From: Gregory Guthrie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:37 AM
To: [EMAIL PROTECTED]
Subject: Tomcat as NT service.. problem.


I tried to setup Tomcat to start as an NT service (Win2k-Pro), as per:
  Working with the Jakarta NT Service
  http://jakarta.apache.org/tomcat/tomcat-3.2-doc/NT-Service-howto.html
  
And it seems OK:
   E:\Net\Apache\Toolsjk_nt_service -i Tomcat
e:\Net\Apache\Tomcat\conf\wrapper.properties
   Asked (and given) winsock 1.1
   The service named Tomcat was created. Now adding registry entries
   Registry values were added
   If you have already updated wrapper.properties you may start the Tomcat
service
   by executing net start Tomcat from the command prompt

But I get:
   E:\Net\Apache\Toolsnet start Tomcat
   The Tomcat service is starting.
   The Tomcat service could not be started.
   The service did not report an error.
   More help is available by typing NET HELPMSG 3534.

Apache runs fine as a service.  :-)
Tomcat runs fine by a DOS startup.
And they run fine together via mod_jk.dll.

I did edit the wrappers.properties file to point to JDK and Tomcat; seems
simple enough.
  
Any help appreciated; I don't know where to look for hints, there are no log
files or errors generated.



Gregory Guthrie
[EMAIL PROTECTED] (641)472-1125Fax: -1103
 



RE: Tomcat as NT service.. problem.

2001-07-10 Thread James Radvan

I expect developers at Microsoft would disagree with that, Randy.  If you're
on the topic of 'thinking before criticising' you might want to taste a bit
of your own medicine! As a software developer, I know that the coders rarely
have the option to make every function perfect with time, budget and other
constraints - that goes for paid Microsoft developers as much as unpaid
Tomcat developers.

-
James Radvan
Websphere Analyst/Architect
London, UK
[EMAIL PROTECTED]
+44 7990 624899


-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: 10 July 2001 10:47
To: [EMAIL PROTECTED]
Subject: RE: Tomcat as NT service.. problem.

I would suggest that you investigate why this is before you call it
a secret trap and stupid.  There are lots of little gottchas like this
in Tomcat (and Windows in general).  They are generally there because the
people at Microsoft couldn't be bothered to make all things work all the
time.




Click here to visit the Argos home page http://www.argos.co.uk

The information contained in this message or any of its attachments may be privileged 
and confidential, and is intended exclusively for the addressee.
The views expressed may not be official policy, but the personal views of the 
originator.  
If you are not the addressee, any disclosure, reproduction, distribution, 
dissemination or use of this communication is not authorised.
If you have received this message in error, please advise the sender by using the 
reply facility in your e-mail software.
All messages sent and received by Argos Ltd are monitored for virus, high risk file 
extensions, and inappropriate content.  As a result users should be aware that mail 
may be accessed.





RE: streaming pdfs through servlet...

2001-07-10 Thread Cox, Charlie
Title: RE: streaming pdfs through servlet...





you may want to do something for your exception - at least write to stdout to indicate you got an error. If you get an exception thrown, you have not written anything to the response, therefore you will get a blank screen.

Charlie


 -Original Message-
 From: Chris Gross [mailto:[EMAIL PROTECTED]]
 Sent: Monday, July 09, 2001 9:42 AM
 To: tomcatlist
 Subject: streaming pdfs through servlet...
 
 
 
 This is my first post to this list. Hi.
 
 I've written a quick little servlet to stream pdf files from 
 my database to
 the browser but I'm encountering a strange little problem. 
 The first time I
 call the servlet the page loads (I can see adobe's little plugin
 initializing) but nothing ever displays. All I see is a 
 whitespace in the
 browser. But if I then immediately hit the refresh button 
 then the pdf
 shows up. Has anyone ever seen anything like this before? 
 I'm not even
 sure where the problem lays, i.e. with the plugin, with the 
 browser, with
 tomcat, or with my servlet.
 
 Adobe plugin version 5
 IE version 5.5
 
 Thanks,
 Chris
 
 
 ps. Here's my servlet.
 
 package com.chessys.trecs;
 
 import javax.servlet.*;
 import javax.servlet.http.*;
 import java.io.*;
 import java.util.*;
 import java.sql.*;
 
 public class ReportManager extends HttpServlet {
 private static final String CONTENT_TYPE = application/pdf;
 /**Initialize global variables*/
 public void init() throws ServletException {
 }
 /**Process the HTTP Get request*/
 public void doGet(HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException {
 response.setContentType(CONTENT_TYPE);
 ServletOutputStream out = response.getOutputStream();
 
 Connection dbConnection = (Connection) request.getSession(
 false ).getAttribute( chesapeake_database_connection);
 
 try {
 Statement stmt = dbConnection.createStatement();
 
 ResultSet rs = stmt.executeQuery(Select PDFImage from 
 reportsinpdf
 where reportid =  + request.getParameter(id));
 
 if (rs.next()) {
 byte [] pdf = rs.getBytes(1);
 out.write(pdf);
 out.flush();
 }
 
 } catch (Exception e) {
 //Yeah i should probably do something here
 };
 
 out.close();
 }
 
 public void doPost(HttpServletRequest request, HttpServletResponse
 response) throws ServletException, IOException {
 doGet(request,response);
 }
 /**Clean up resources*/
 public void destroy() {
 }
 }
 





RE: Newbie needs help

2001-07-10 Thread Graham, Steve (GIC)



nope , all i have in tomcat/lib isant.jat  ,  jaxp.jar  and
servlet.jar



Re: JDBC Realm error on startup

2001-07-10 Thread David Herder

What can you recommend to use as a driver (JDBC) for an 
Access/Tomcat/Apache/jdk 1.3.1 configuration??
thanks, dave

 Using the JDBC-ODBC Bridge can not lead to jar problems as is included
 on the default bootstrap classpath.., perhaps a incorrectly created
 ODBC?

 My point was not that the bridge would cause this problem but that it
 causes problems in general.  Why add another layer to your code when
 it is unnecessary.  The only reason I really see for Access is DB
 portability to other machine, and for most individuals this is not an
 issue.


 ---
 Michael Wentzel
 Software Developer
 Software As We Think - http://www.aswethink.com
 



Re: help with building mod_jk

2001-07-10 Thread mbb

Hi Ben,

I actually did set the JDK explicitly, but just wrote in JAVA_HOME in the
email to save typing :-)

Any other ideas??  I'm still stumped.

Michael

on 7/10/01 4:29 AM, Ben Parker at [EMAIL PROTECTED] wrote:

 Maybe $JAVA_HOME isn't set right? Try setting the jdk directory explicitly.
 
 Ben
 
 
 -Original Message-
 From: mbb [mailto:[EMAIL PROTECTED]]
 Sent: 09 July 2001 23:22
 To: [EMAIL PROTECTED]
 Subject: help with building mod_jk
 
 
 Hello,
 
 I just tried to build and install mod_jk from the Tomcat 3.2 source
 distribution.  I'm running YellowDog Linux 1.2 (which is pretty
 much RedHat
 6 for the PowerPC).
 
 First, from the unpacked TOMCAT_SOURCE/src/native/apache1.3
 directory I ran:
 
 apxs -o mod_jk.so -I../jk -I$JAVA_HOME/include
 -I$JAVA_HOME/include/linux -c
 *.c ../jk/*.c
 
 and I got an error at jk_jni_worker.c saying that it couldn't
 find jni_md.h
 in the /include directory.  I looked and found that file in the
 /include/linux directory... So, I put a copy in the /include directory and
 ran the apxs command again.
 
 This time it went through what seemed like all the C files and then at the
 very end starts listing -o mod_jk.so jk_worker.o and all the
 jk_'something'.o files.  It lists all of the *.o files from the
 /src/native/jk directory and then stops with rc=255 and gives me back the
 Bash prompt.
 
 Any ideas?
 
 Thanks!
 
 Michael
 
 
 




RE: help with building mod_jk

2001-07-10 Thread GOMEZ Henri

You should take a look at J-T-C, there is a build conf stuff
which should help you 

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



-Original Message-
From: mbb [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 09, 2001 10:22 PM
To: [EMAIL PROTECTED]
Subject: help with building mod_jk


Hello,

I just tried to build and install mod_jk from the Tomcat 3.2 source
distribution.  I'm running YellowDog Linux 1.2 (which is 
pretty much RedHat
6 for the PowerPC).

First, from the unpacked TOMCAT_SOURCE/src/native/apache1.3 
directory I ran:

apxs -o mod_jk.so -I../jk -I$JAVA_HOME/include 
-I$JAVA_HOME/include/linux -c
*.c ../jk/*.c

and I got an error at jk_jni_worker.c saying that it couldn't 
find jni_md.h
in the /include directory.  I looked and found that file in the
/include/linux directory... So, I put a copy in the /include 
directory and
ran the apxs command again.

This time it went through what seemed like all the C files and 
then at the
very end starts listing -o mod_jk.so jk_worker.o and all the
jk_'something'.o files.  It lists all of the *.o files from the
/src/native/jk directory and then stops with rc=255 and gives 
me back the
Bash prompt.

Any ideas?

Thanks!

Michael




Re: help with building mod_jk

2001-07-10 Thread mbb

To exhibit my immense ignorance... I sheepishly ask what the J-T-C is...?
(Jakarta Tomcat something?)

Thanks

Michael

on 7/10/01 9:05 AM, GOMEZ Henri at [EMAIL PROTECTED] wrote:

 You should take a look at J-T-C, there is a build conf stuff
 which should help you
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6





RE: help with building mod_jk

2001-07-10 Thread GOMEZ Henri

Sorry,

jakarta-tomcat-connectors, tomcat sub-project focusing
on mod_jk/mod_webapp :)

Access it via cvs 

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



-Original Message-
From: mbb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 3:12 PM
To: [EMAIL PROTECTED]
Subject: Re: help with building mod_jk


To exhibit my immense ignorance... I sheepishly ask what the 
J-T-C is...?
(Jakarta Tomcat something?)

Thanks

Michael

on 7/10/01 9:05 AM, GOMEZ Henri at [EMAIL PROTECTED] wrote:

 You should take a look at J-T-C, there is a build conf stuff
 which should help you
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6





If Anyone Is Interested ......Potential For IIS-Tomcat Install Program

2001-07-10 Thread Russell, Steve

Hi;

At my boss's request I PHP enabled our development server.

I went to:
http://www.php.net

They had an install program there for integrating PHP with IIS.  It was very
nice.  No exxhageration, it took me less then 5min to get everything going (
I'm still having fun and games getting Tomcat  IIS to play nice ).

Anyway, I thought I would mention it as it shows that there is potential to
control IIS programmatically,at least enough to write an install for
smooshing tomcat  IIS together.

Since PHP is an open source thing I'm sure if there was some web
server/windows/tomcat savvy programmer out there into writing an install
s/he could contact the appropriate folks to get some leads on help.

A legion of people who have pulled their hair out to get tomcat  IIS set up
will be your best friends :)

Steve

Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender by email, delete and destroy this message and its 
attachments.


**



RE: Newbie needs help

2001-07-10 Thread Graham, Steve (GIC)


i just looked at webserver.jar, and it does not include file
ThreadPool$ControlRunnable file you mentioned 




RE: problem with getPort()

2001-07-10 Thread Fernando_Salazar


Hmm ... you may need to file a bug, or do some Tomcat debugging.  One thing
to try, use:

reponse.sendRedirect( http://beru.cariboulake.com/servlet/Servlet2; );

I bet that would work ... looks like the code that processes sendRedirect()
first tries to
make an Url out of the specified location, and if that doesn't work, it
makes the request
URL and formulates the new location relative to that.

- Fernando



Unfortuantly I did get something like that.

HTTP/1.1 302
Date: Mon, 09 Jul 2001 20:56:22 GMT
Server: Apache/1.3.20 (Unix) mod_jk
Location: http://beru.cariboulake.com:0/servlet/Servlet2
Content-Length: 179
Connection: close

This sounds odd, but what if I swiched to ajp13?  Could that hopefully
change anything?

thanks

joe










are there servlet aliases

2001-07-10 Thread Andreas Tirok

Hi all,

may I use aliases for servlets?

With Jserv I can use 

servlet.WebBILL_MainMenu.code=beusen.bill.MainMenuServlet

that /servlet/WebBILL_MainMenu 
refer to (/servlet)/beusen/bill/MainMenuServlet

How can I do this with tomcat?

Thx

andy
-- 
---
mailto:[EMAIL PROTECTED]
fon: +49 30 549932-37
fax: +49 30 549932-21




Reloading

2001-07-10 Thread Hector Adolfo Alonso

Hi servleters:
   I've making some tests trying to resolve when and how Tomcat does
a servlet reloading. The spec says that when a servlet container makes
a servlet reloading, it must discard all classes previouslly loaded for its
context. This really works for Tomcat, but it doesn't work very well, at
least for me. For example, if I change two servlets and some utility classes,
one of the servlets and the utility classes, are reload, but no both of the
servlets (not every time). I'm using Tomcat 3.2.2 with mod_jk / ajp13,
Windows NT 4.0 SP6, JDK 1.2.2_008, Apache 1.3.20. I've read the
release notes too.
   Does anybody know where I can find some useful information about
this topic.
   Thanks in advance.

Hector Adolfo Alonso
Consist Teleinformatica S. A.





Hidden Gotcha - How To Avoid A 404 - Integrating IIS, Tomcat, Using C:\Inetpub\wwwroot\test

2001-07-10 Thread Russell, Steve

Hi;

I just spent some time doing some hair pulling.  I figured it out and I
thought I would post what I learned here so that it would make it into the
archives.

Here is what I did:
I integrated Tomcat 3.2 with IIS 5 on windows 2000.

I made a test.jsp page that worked in C:\Inetpub\wwwroot  any
subdirectory there of.

However, I kept getting a 404 for test.jsp when I put it in
C:\Inetpub\wwwrooot\test\

It turns out that Tomcat has a C:\Tomcat\webapps\test\

It doesn't appear in server.xml, but when I added

Context path=/test docBase=C:/InetPub/wwwroot/test debug=0
reloadable=true/ 

to server.xml and rebooted tomcat the problem went away

Good Luck

Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]


-Original Message-
From: Russell, Steve [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 9:22 AM
To: '[EMAIL PROTECTED]'
Subject: If Anyone Is Interested ..Potential For IIS-Tomcat Install
Pr ogram


Hi;

At my boss's request I PHP enabled our development server.

I went to:
http://www.php.net

They had an install program there for integrating PHP with IIS.  It was very
nice.  No exxhageration, it took me less then 5min to get everything going (
I'm still having fun and games getting Tomcat  IIS to play nice ).

Anyway, I thought I would mention it as it shows that there is potential to
control IIS programmatically,at least enough to write an install for
smooshing tomcat  IIS together.

Since PHP is an open source thing I'm sure if there was some web
server/windows/tomcat savvy programmer out there into writing an install
s/he could contact the appropriate folks to get some leads on help.

A legion of people who have pulled their hair out to get tomcat  IIS set up
will be your best friends :)

Steve

Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender by email, delete and destroy this message and its 
attachments.


**



[NEWBIE] Static html pages do not show image files

2001-07-10 Thread Algarve, Leila

Hi!!!

I am running Tomcat 4.0b5 standalone in Windows NT 4.0.
I've created a new web-application in $tomcathome$\webapps without creating
a war file (I am at the early stage of development), with one html static
page and one servlet. I can access the html page and the servlet without
problem but I cannot see any image (gif). The html and the images are in the
same directory ($tomcathome$\webapps\MyWebApp), if I open the html file
(without using Tomcat) the images just show fine.

The only thing that I changed in the server.xml was that I added a new
context for my web-application. In the $tomcathome$\webapps\MyWebApp\WEB-INF
directory I have my web.xml: 

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
2.2//EN 
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
web-app
display-nameServlet Applicationt/display-name
descriptionThis the servlet aplication
/description
servlet
servlet-nameMyServlet/servlet-name
servlet-classMyServletClass/servlet-class
/servlet
servlet-mapping
servlet-nameMyServlet/servlet-name
url-pattern/MyServlet/url-pattern
/servlet-mapping
/web-app

What am I missing?

Thanks
Leila



Re: Nasty OutofMemory problem - possible reason: Cookie name path is a reserved token Exception?

2001-07-10 Thread Rick

do you have a simple application or does it have complex components like rmi
server or pooling.  Look for data structures like pooling that have refrences
that never go away,  It may be something is allocating objects to a thread that
never dies it may help if you set stuff you are not using to null.  Tell us more
about what your application is doing, how moany seperate components does it
utilize and if you run those alone on a server does it still throw the
exception.


good luck
rick

Ben Parker wrote:

 We are facing a very persisitent and nasty OutofMemory problem and have
 narrowed down the possible culprits

 SETUP:

 Linux 2.2.14 SMP
 Tomcat 3.2.2 binary
 JDK (Sun 1.3)
 Apache 1.3.16 (with mod_usertrack for cookies)
 mod_jk compiled from source (thanks to this list's archives, that helped the
 99% CPU problem we had earlier!)

 PROBLEM:

 However much memory we throw at it, after a few hours, Tomcat gives up with
 an OutofMemory Exception.

 We gave the JVM 128, 256, 512 and today, 1024M RAM, and still it happens. In
 server.xml, max_threads is set to 150, as is Apache's MaxClients.

 There are rarely more than 85 httpd processes runnig, and 40 of those are
 spares. So let's say 50 concurrent users is high for us.

 Now, some earlier code used to use a cookie name path until we realised it
 is not a good thing. Despite cleaning up whereever we can, we get several of
 these errors on different pages, which seem to precipiate memory leaking or
 wasting:

 2001-07-09 08:35:49 - Ctx( /site ): Exception in: R( /site +
 /africa/index.jsp +
  null) - java.lang.IllegalArgumentException: Cookie name path is a reserved
 token

 We are sure the page is not requesting the cookie, but it is possible the
 browser once had the cookie set in the past from earlier code.

 THE QUESTION: How can we catch this error gracefully and stop it eating
 memory? Does this sound like the lilkely culprit? We are also running Jive
 1.2.4, in case anyone has found any problems with that. How can the cookie
 make a problem if the page is not requesting it?

 Any suggestions gratefully received.

 Ben Parker
 Nairobi




Tip: Avoiding A 404 With *.jsp In Virtual Directories Using IIS 5 Tomcat On Windows 2000

2001-07-10 Thread Russell, Steve

Hi;

I just spent some more time hair pulling for something I'm sure other people
will experience.  I am posting my solution here so that it will end up in
the archives.

I have IIS 5, Tomcat 3.2, jdk 1.3.1 working together on windows 2000.

I like to keep all of my work in C:\Projectsmany good reasons to do
this.

I set up C:\Projects as a virtual directory in IIS.

I kept getting a 404 whenever I tried to access my test.jsp page.

I solved the problem by adding this line to server.xml in my Tomcat\conf
dir, and then rebooting tomcat:

Context path=/Projects docBase=C:/InetPub/wwwroot/Projects
debug=0 reloadable=true/ 

Good Luck

Steve




Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender by email, delete and destroy this message and its 
attachments.


**



jakarta-tomcat-connectors (was: help with building mod_jk)

2001-07-10 Thread mbb

Henri,

I've looked through the JTC directories on the cvs server.  The documents
directory has the how-tos and readmes that you and others have written that
got me as far as I am (before the rc=255 error).  In the
/jk/native/apache-1.3 directory there are new makefiles for linux and build
files for Unix.

Do I understand you correctly to use this Makefile.linux instead of the one
from the Tomcat 3.2 source?  After my attempts with apxs only got me so far
I tried the Makefile.linux as per your instructions in the how-to but got an
error that apxs isn't in /sbin... which it's not, but I don't know how to
tell 'make' explicitly to go to APACHE_HOME/bin for apxs.  Should I just add
a symbolic link to sbin?

I'm obviously in over my head here being a newbie... but I'd like to fix
that by learning why the apxs command looks like it all but just finishes
building mod_jk before barfing.

Thanks again!

Michael

on 7/10/01 9:18 AM, GOMEZ Henri at [EMAIL PROTECTED] wrote:

 Sorry,
 
 jakarta-tomcat-connectors, tomcat sub-project focusing
 on mod_jk/mod_webapp :)
 
 Access it via cvs
 
 -
 Henri Gomez ___[_]
 EMAIL : [EMAIL PROTECTED](. .)
 PGP KEY : 697ECEDD...oOOo..(_)..oOOo...
 PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6





using pre-compiled JSPs

2001-07-10 Thread Eitan Ben-Noach

Hello,

I would like to know whether pre-compiled JSPs is a conventional way for
deploying JSPs at the customers sites? Are there any disadvantages with
this approach?

Thanks,

Eitan Ben-Noach




Tip: Using Tomcat Without A Web Server Setting Up A New WebApp Outside Of The Tomcat Hierarchy

2001-07-10 Thread Russell, Steve

Well, I figure as long as I am on a roll I would also post this other tidbit
that I learned on my own and I am sure other people will want to do.

Anyway, lets just say you want to use Tomcat by itself without a web server.
You also want to set up Tomcat so that it will see *.jsp files and servlets
in the directory of your choice on windows.

I like to keep all of my work in C:\Projects.  It makes everything easy to
find and easy to navigate to on a command line.

I put this line in my server.xml ( Tomcat\conf ) file and rebooted Tomcat:

Context path=/Projects docBase=C:/Projects debug=0
reloadable=true/

After I did this Tomcat saw every *.jsp under C:\Projects or its
subdirectories.  Tomcat also saw servlets in C:\Projects\WEB-INF\classes

The URLs for test.jsp and TestServlet would be:
http://localhost:8080/Projects/servlet/TestServlet
http://localhost:8080/Projects/test.jsp

To make things easy on myself I set my classpath as:

.;C:\Classes

I found this to be very convent for Java.  Just put your Java classes,
beans, packages, jars( unjarred) into C:\Classes and *jsps, servlets, or any
other Java will easily find your java stuff without you having to do more
mucking around with your classpath.

With jdk 1.3.* you can also just drop jars as they are into C:\jdk
home\jre\lib\ext

Just be careful when you uninstall the jdk not to throw it out.

Steve



Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]



**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender by email, delete and destroy this message and its 
attachments.


**



RE: getServletContext() throws NullPoinetException

2001-07-10 Thread Randy Layman


Do you, perhaps, implement the init method and not call
super.init(config)?  Did this once and I'll never do it again.

Randy

 -Original Message-
 From: Stefanos Karasavvidis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 10:46 AM
 To: [EMAIL PROTECTED]
 Subject: getServletContext() throws NullPoinetException
 
 
 I've just installed tomcat 3.2.2 and have the following problem.
 
 I want to call getServletContext() from a servlets service method but 
 get the folowing exception
 *Internal Servlet Error:*
 
 java.lang.NullPointerException
   at 
 javax.servlet.GenericServlet.getServletContext(GenericServlet.
java:205)
   at TestServlet.service(TestServlet.java:32)
   at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
.java:405)
   at org.apache.tomcat.core.Handler.service(Handler.java:287)
   at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
   at 
 org.apache.tomcat.core.ContextManager.internalService(ContextM
anager.java:797)
   at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
   at 
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
 cessConnection(Ajp12ConnectionHandler.java:166)
   at 
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
t.java:416)
   at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
ol.java:501)
   at java.lang.Thread.run(Thread.java:484)
 
 
 Moreover the getServletConfig() returns null which is 
 probably the main 
 reason for this problem
 
 Any ideas??
 
 Stefanos
 
 



RE: getServletContext() throws NullPoinetException

2001-07-10 Thread Vladimir Grishchenko

Did you override init(ServletConfig config) method?
YOu must call super(config) if you did...

--V.

-Original Message-
From: Stefanos Karasavvidis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:46 AM
To: [EMAIL PROTECTED]
Subject: getServletContext() throws NullPoinetException


I've just installed tomcat 3.2.2 and have the following problem.

I want to call getServletContext() from a servlets service method but 
get the folowing exception
*Internal Servlet Error:*

java.lang.NullPointerException
at
javax.servlet.GenericServlet.getServletContext(GenericServlet.java:205)
at TestServlet.service(TestServlet.java:32)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)


Moreover the getServletConfig() returns null which is probably the main 
reason for this problem

Any ideas??

Stefanos



***
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original
message.
***



RE: Reloading

2001-07-10 Thread Vladimir Grishchenko

Make sure the classes you're trying to reload are not on the system
classpath

--V.

-Original Message-
From: Hector Adolfo Alonso [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:44 AM
To: [EMAIL PROTECTED]
Subject: Reloading


Hi servleters:
   I've making some tests trying to resolve when and how Tomcat does
a servlet reloading. The spec says that when a servlet container makes
a servlet reloading, it must discard all classes previouslly loaded for its
context. This really works for Tomcat, but it doesn't work very well, at
least for me. For example, if I change two servlets and some utility
classes,
one of the servlets and the utility classes, are reload, but no both of the
servlets (not every time). I'm using Tomcat 3.2.2 with mod_jk / ajp13,
Windows NT 4.0 SP6, JDK 1.2.2_008, Apache 1.3.20. I've read the
release notes too.
   Does anybody know where I can find some useful information about
this topic.
   Thanks in advance.

Hector Adolfo Alonso
Consist Teleinformatica S. A.



***
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original
message.
***



RE: getServletContext() throws NullPoinetException

2001-07-10 Thread William Kaufman

Looking at the source (available from
http://jakarta.apache.org/builds/jakarta-tomcat/release/) it looks like the
only way this would happen is if it doesn't have the ServletConfig passed
into its init() method.

Are you intercepting the call to init() in your servlet?  If so, are you
making sure to call the superclass' init() method?

-- Bill K. 

 -Original Message-
 From: Stefanos Karasavvidis [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 7:46 AM
 To: [EMAIL PROTECTED]
 Subject: getServletContext() throws NullPoinetException
 
 
 I've just installed tomcat 3.2.2 and have the following problem.
 
 I want to call getServletContext() from a servlets service method but 
 get the folowing exception
 *Internal Servlet Error:*
 
 java.lang.NullPointerException
   at 
 javax.servlet.GenericServlet.getServletContext(GenericServlet.
 java:205)
   at TestServlet.service(TestServlet.java:32)
   at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
 .java:405)
   at org.apache.tomcat.core.Handler.service(Handler.java:287)
   at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
   at 
 org.apache.tomcat.core.ContextManager.internalService(ContextM
 anager.java:797)
   at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
   at 
 org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
 cessConnection(Ajp12ConnectionHandler.java:166)
   at 
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
 t.java:416)
   at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
 ol.java:501)
   at java.lang.Thread.run(Thread.java:484)
 
 
 Moreover the getServletConfig() returns null which is 
 probably the main 
 reason for this problem
 
 Any ideas??
 
 Stefanos
 
 



Tomcat resources...

2001-07-10 Thread tomcat

Hi,
I have a resource problem with a web application I'm going to deploy on a
box which only has 8MB of spare Flash memory for my Web Server/JSP
container, the JVM and libraries.
What I need is a JVM with a small memory footprint - I started looking into
the minimised JVMs which comply with the J2ME. 
However, according to an answer from a posting I made, Tomcat needs (at
least) the standard edition. Does anybody know if this is right??? 

Furthermore, could anybody give me an idea of the size of Tomcat OR could
anybody possibly tell me which web server/jsp container has the smallest
footprint (under 8 MB of course!).

Thanks in advance
j

(My brain hurts...)


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify [EMAIL PROTECTED]





Applet - Servlet connectivity

2001-07-10 Thread Jon Evans

Hi,

I've got a problem with Tomcat and IIS that I'm hoping someone might have an 
answer to.

My applet opens a socket connection back to the web server, and basically 
sends:
GET /path/to/servlet HTTP/1.0 

in order to invoke the servlet.

It then opens an InputStream and reads the server responses, waits for them 
to finish, and opens an ObjectInputStream from the InputStream.

In the meantime it also opens an ObjectOutputStream on the same socket, in 
order to pass data back to the Servlet.

In my development environment (Linux), talking directly to Tomcat on port 
8080, it works fine.  When I try it on NT, with IIS, again it works fine if I 
ignore IIS and talk directly to Tomcat, but if I go via IIS on port 80 it 
fails.

By putting log messages in the servlet, I can see that it stalls while trying 
to read from the InputStream - it doesn't seem to see the stuff I send from 
the applet.

I'm attaching to IIS with apj12.

Can anyone give me a clue?

Thanks in advance,

-- 
Jon Evans
Senior Developer
http://www.helpmagic.com/



RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS, Tomcat, U sing C:\Inetpub\wwwroot\test

2001-07-10 Thread Randy Layman


Your problem was related to the line in the default server.xml file:
ContextInterceptor className=org.apache.tomcat.context.AutoSetup
/
which will create a context for each directory or WAR in the webapps
directory.

Randy

 -Original Message-
 From: Russell, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 11:05 AM
 To: '[EMAIL PROTECTED]'
 Subject: Hidden Gotcha - How To Avoid A 404 - Integrating 
 IIS, Tomcat, 
 U sing C:\Inetpub\wwwroot\test
 
 
 Hi;
 
 I just spent some time doing some hair pulling.  I figured it 
 out and I
 thought I would post what I learned here so that it would 
 make it into the
 archives.
 
 Here is what I did:
 I integrated Tomcat 3.2 with IIS 5 on windows 2000.
 
 I made a test.jsp page that worked in C:\Inetpub\wwwroot  any
 subdirectory there of.
 
 However, I kept getting a 404 for test.jsp when I put it in
 C:\Inetpub\wwwrooot\test\
 
 It turns out that Tomcat has a C:\Tomcat\webapps\test\
 
 It doesn't appear in server.xml, but when I added
 
 Context path=/test 
 docBase=C:/InetPub/wwwroot/test debug=0
 reloadable=true/ 
 
 to server.xml and rebooted tomcat the problem went away
 
 Good Luck
 
 Steve Russell
 
 Web Developer III
 ValueOptions - Lifescape
 703-205-6589
 [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Russell, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 9:22 AM
 To: '[EMAIL PROTECTED]'
 Subject: If Anyone Is Interested ..Potential For 
 IIS-Tomcat Install
 Pr ogram
 
 
 Hi;
 
 At my boss's request I PHP enabled our development server.
 
 I went to:
 http://www.php.net
 
 They had an install program there for integrating PHP with 
 IIS.  It was very
 nice.  No exxhageration, it took me less then 5min to get 
 everything going (
 I'm still having fun and games getting Tomcat  IIS to play nice ).
 
 Anyway, I thought I would mention it as it shows that there 
 is potential to
 control IIS programmatically,at least enough to write an 
 install for
 smooshing tomcat  IIS together.
 
 Since PHP is an open source thing I'm sure if there was some web
 server/windows/tomcat savvy programmer out there into writing 
 an install
 s/he could contact the appropriate folks to get some leads on help.
 
 A legion of people who have pulled their hair out to get 
 tomcat  IIS set up
 will be your best friends :)
 
 Steve
 
 Steve Russell
 
 Web Developer III
 ValueOptions - Lifescape
 703-205-6589
 [EMAIL PROTECTED]
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the sender by email, delete and destroy this message and its 
 attachments.
 
 
 **
 



RE: [NEWBIE] Static html pages do not show image files

2001-07-10 Thread Randy Layman


What is the src of the img tag in your html file?  Some tools will
put fully qualified file names in there instead of relative paths.

Randy

 -Original Message-
 From: Algarve, Leila [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 11:11 AM
 To: '[EMAIL PROTECTED]'
 Subject: [NEWBIE] Static html pages do not show image files
 
 
 Hi!!!
 
 I am running Tomcat 4.0b5 standalone in Windows NT 4.0.
 I've created a new web-application in $tomcathome$\webapps 
 without creating
 a war file (I am at the early stage of development), with one 
 html static
 page and one servlet. I can access the html page and the 
 servlet without
 problem but I cannot see any image (gif). The html and the 
 images are in the
 same directory ($tomcathome$\webapps\MyWebApp), if I open the 
 html file
 (without using Tomcat) the images just show fine.
 
 The only thing that I changed in the server.xml was that I added a new
 context for my web-application. In the 
 $tomcathome$\webapps\MyWebApp\WEB-INF
 directory I have my web.xml: 
 
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web 
 Application
 2.2//EN 
 http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
 web-app
   display-nameServlet Applicationt/display-name
   descriptionThis the servlet aplication
 /description
   servlet
   servlet-nameMyServlet/servlet-name
   servlet-classMyServletClass/servlet-class
   /servlet
   servlet-mapping
   servlet-nameMyServlet/servlet-name
   url-pattern/MyServlet/url-pattern
   /servlet-mapping
 /web-app
 
 What am I missing?
 
 Thanks
 Leila
 



instantDB in development

2001-07-10 Thread Kemp Randy-W18971

I am playing with accessing databases on instantDB in development.  Can
someone give me the equivalent code in instandDB, for the code I use with
Oracle (as far as classname and url goes, given I have the drivers correctly
loaded)?

  String username = duck;
String password = daffy;  
String url=jdbc:oracle:thin:@this.is.a.fake.name:1521:helpme; 
Connection con;
//  String query = SELECT * FROM alex_course;
String query = SELECT * FROM me_job_entry;
Statement stmt;


try {
Class.forName(oracle.jdbc.driver.OracleDriver);
}
catch (java.lang.ClassNotFoundException e) {
System.err.print(ClassNotFoundException: );
System.err.println(e.getMessage());
}



Tomcat admin resources

2001-07-10 Thread Renato Weiner
Hi all,
I'm looking for some admin resources for Tomcat 3.2.2 in a multi-hosted environment. Are there administration samples, besides the admin.war package that comes with the tar.gz ? 
Is it possible to list the servlets that are currently loaded per context, see how much memory they are taking and do admin stuff like that ?
Thanks in advance
Renato.Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!http://personal.mail.yahoo.com/

Re: Newbie needs help

2001-07-10 Thread Boris Niyazov

you can get it from 

http://java.sun.com/xml/xml_jaxp.html

  - Boris




again is under tomcat/lib.


- Original Message - 
From: Graham, Steve (GIC) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 10, 2001 1:17 PM
Subject: RE: Newbie needs help


 ok, found it. thx  . Another jar file i am looking for is parser.jar .
 During the ./build.sh  i get error   Could not find file
 /jaxp-1.0.1/parser.jar
 
 ???
 
 
 
 





RE: using pre-compiled JSPs

2001-07-10 Thread Randy Layman


I like it for two reasons:
1.  Performance
2.  Don't need to distribute JavaC with the application

The drawbacks as I see it:
1.  Recompiling the JSPs generally works better than updating
servlets for getting an update out while the server is running
2.  There isn't currently any good way of merging the generated
web.xml file with your web.xml file.  (Making automated builds relies on
inserting some special token to your web.xml file in order to do the merge,
or requires building a process that reads your web.xml file, knows where the
other xml file goes, and performs the merge for you).
3.  It can be confusing for new developers who don't quite
understand that file.jsp is really being handled by a servlet and that's why
their changes to the file.jsp file are not seeming to take affect.

Randy


 -Original Message-
 From: Eitan Ben-Noach [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 12:19 PM
 To: [EMAIL PROTECTED]
 Subject: using pre-compiled JSPs
 
 
 Hello,
 
 I would like to know whether pre-compiled JSPs is a 
 conventional way for
 deploying JSPs at the customers sites? Are there any 
 disadvantages with
 this approach?
 
 Thanks,
 
 Eitan Ben-Noach
 



Re: can't find download page for jakarta-servletapi

2001-07-10 Thread Boris Niyazov

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/src/

  - Boris



Hi,

I'm new to Tomcat. 

I can't find the any source for the
jakarta-servletapi.

I found one email to this subject in the 
archive, but there where no solutions
at all.

Thx.

andy
-- 
---
mailto:[EMAIL PROTECTED]
fon: +49 30 549932-37
fax: +49 30 549932-21





Tomcat resource issues...

2001-07-10 Thread tomcat

Hi,
I have a resource problem with a web application I'm going to deploy on a
box which only has 8MB of spare Flash memory for my Web Server/JSP
container, the JVM and libraries.
What I need is a JVM with a small memory footprint - I started looking into
the minimised JVMs which comply with the J2ME. 
However, according to an answer from a posting I made, Tomcat needs (at
least) the standard edition. Does anybody know if this is right??? 

Furthermore, could anybody give me an idea of the size of Tomcat OR could
anybody possibly tell me which web server/jsp container has the smallest
footprint (under 8 MB of course!).

Thanks in advance
j

(My brain hurts...)



This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify [EMAIL PROTECTED]





How to solve the character encoding problem with JSP

2001-07-10 Thread Andre Tampold


Hello all Tomcat users!

I'm new to Tomcat. Installed it yesterday and it seems to me running very
well.

Only one question is arised, which probably is answered already, but I did
not found answer for that from archive.

Currently in production we have JavaWebServer2.0 / Win NT, JDK1.3 and this
works very well for solving encoding problem with JSP:


///
//
//  How to solve the character encoding problem with JSP
//  
//
// 1. Comment out this line in generated file's _jspService method:
// JspWriter out = null;

// 2. Insert this line where you commented out number 1:
// PrintWriter out = response.getWriter();

// 3. Comment out this line in generated file's _jspService method:
// out = pageContext.getOut();

// 4. At the end of the _jspService method you find:
// } catch (Throwable t) {
//  * if (out.getBufferSize() != 0)
//  * out.clear();
//  Lines marked with * shall be commented out.
//
// 5. After lines mentioned in point 4 you find:
//  HandleErrorPageException("...errorpage.jsp", t, out);
//Change it to:
//  HandleErrorPageException("...errorpage.jsp", t,
pageContext.getOut());

///

Actually there are some Lexicon files in Cp1251, Cp1257 and UTF-8 encodings,
which need to come through JSP to browser. With JavaWebServer2.0 this is ok,
if we do as described in steps 1.-5.

How to do it with Tomcat? I did the same but it seems to me no effect at
all. Only  marks or unreadable characters. What is missing?

Thanks in advance for any kind of info/URL/help,

Andre Tampld
Software Development @ EMK




RE: streaming pdfs through servlet...

2001-07-10 Thread Chris Gross


Thanks for everyones help, I finally found the solution.  I figured I send
it back to the list in case anyone else encounters this same problem in the
future.  I had to set the content length before writing the bytes.  So I
just had to add:

response.setContentLength(pdf.length);

to the servlet before writing any data.

-chris




RE: are there servlet aliases

2001-07-10 Thread Chauhan, Anand

Andreas:

Definitely yes. Check the following snippet of my example web.xml file for details.. 
and we could call the servlet ServletExample using each of the following mappings:

http://localhost:8080/ContextName/servlet/hi
http://localhost:8080/ContextName/hello.html
http://localhost:8080/ContextName/any-filename.hello
http://localhost:8080/ContextName/hello/any-filename.any-extension



servlet
servlet-name
hi
/servlet-name
servlet-class
ServletExample
/servlet-class
 /servlet
 servlet-mapping
servlet-name
hi
/servlet-name
url-pattern
/hello.html
/url-pattern
 /servlet-mapping
 servlet-mapping
servlet-name
hi
/servlet-name
url-pattern
*.hello
/url-pattern
 /servlet-mapping
 servlet-mapping
servlet-name
hi
/servlet-name
url-pattern
/hello/*
/url-pattern
 /servlet-mapping

Good Luck ! 

Enjoy,
Anand..




 -Original Message-
From:   Andreas Tirok [mailto:[EMAIL PROTECTED]] 
Sent:   Tuesday, July 10, 2001 7:32 AM
To: [EMAIL PROTECTED]
Subject:are there servlet aliases

Hi all,

may I use aliases for servlets?

With Jserv I can use 

servlet.WebBILL_MainMenu.code=beusen.bill.MainMenuServlet

that /servlet/WebBILL_MainMenu 
refer to (/servlet)/beusen/bill/MainMenuServlet

How can I do this with tomcat?

Thx

andy
-- 
---
mailto:[EMAIL PROTECTED]
fon: +49 30 549932-37
fax: +49 30 549932-21



Fundamental Problems transitioning from JServ to Tomcat 3.2.2

2001-07-10 Thread tomcatlist

I have some very basic problems with my Tomcat config.

I had a site that was working fairly well using Apache
1.3.14 and Jserv. I had installed the whole thing as a
single RPM. I wrote a collection of servlets using
Peter Mount's Postgresql JDBC 2.0 driver.

Well, not being the type to leave well enough alone, I
wanted to upgrade to Tomcat.

It works, sort of (http://jeromio.com/examples). The
examples, the test and admin stuff (although I can't
get past the login despite adding a user with an
admin role in tomcat-users.xml).

But for the life of me I can't get anything else to
work. I used to have
http://jeromio.com/servlets/servletname. I tried
adding a servlet Context in the server.xml. This seems
to be pointing to the right directory now (it displays
the index.html file I have there), but adding the name
of a servlet results in 404. My servlets are all
.class files - must I create war files? I hope not.

Also, and I believe this is a related problem, I can't
get jetspeed to work. Copying the jetspeed .war file
to the webapps directory, then starting tomcat got me
the whole jetspeed directory tree under webapps.
There's also lots of output related to jetspeed during
the tomcat startup, but http://jeromio.com/jetspeed
results in a 404. I have tried adding explicit Context
and directory tags to the server.xml and the
modjk.conf file (that gets Included in my apache.conf
file), but I've gotten nowhere.

Seems like I am s close. Can anyone offer any
pointers?





Re: getServletContext() throws NullPoinetException - solved

2001-07-10 Thread Stefanos Karasavvidis

found it... I didn't call super.init(config) in the init() method

sorry

Stefanos

Stefanos Karasavvidis wrote:

 I've just installed tomcat 3.2.2 and have the following problem.

 I want to call getServletContext() from a servlets service method but 
 get the folowing exception
 *Internal Servlet Error:*

 java.lang.NullPointerException
 at 
 javax.servlet.GenericServlet.getServletContext(GenericServlet.java:205)
 at TestServlet.service(TestServlet.java:32)
 at 
 org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at org.apache.tomcat.core.Handler.service(Handler.java:287)
 at 
 org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at 
 org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) 

 at 
 org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at 
 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
 

 at 
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) 

 at java.lang.Thread.run(Thread.java:484)


 Moreover the getServletConfig() returns null which is probably the 
 main reason for this problem

 Any ideas??

 Stefanos









RE: Urgent help with tomcat 4.0 b5

2001-07-10 Thread Greg Trasuk

The parser error is saying that it is finding a servlet-mapping element
inside a description element, which is not valid according to the DTD.
Offhand, I suspect you have an unclosed description element.  Look for a
very subtle typographical error or spelling mistake in your web.xml.
Unfortunately, I find you can look at those things for hours and still miss
minor errors.

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use technology to turn
information into profits on your plant floor.
http://stratuscom.ca

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 8:29 AM
To: [EMAIL PROTECTED]
Subject: Urgent help with tomcat 4.0 b5


Hi there
i downloaded Tomcat 4.0 b5 and installed it on my PC running win98. it works
fine but for some reason i get the following error on the MS DOS window when
i start it:

Starting service Tomcat-Standalone
Apache Tomcat/4.0-b5
PARSE error at line 77 column -1
org.xml.sax.SAXParseException: Element description does not allow
servlet-map
ping -- (#PCDATA)
Starting service Tomcat-Apache
Apache Tomcat/4.0-b5

i get this error ONLY when i add my context to the server.xml... i cant see
whats wrong as i used the same context with tomcat 3.2.2 and it was
fine...here is the context i added:

Context path=/wap
docBase=c:/wapfolder
debug=0
reloadable=true 
/Context

please advise... i give up :-)
thanx
Tim




RE: using pre-compiled JSPs

2001-07-10 Thread Greg Trasuk

One big disadvantage is that if you have precompiled JSP's, your web
application is no longer portable to different servers (possibly not even
across Tomcat versions, although I'm not sure).  The reason is that the JSP
spec does not include any guidelines for naming or implementing the
generated servlet, i.e. it's implementation dependent.

On the other hand, you could take the generated servlet, put it into the
WEB-INF/classes directory, and add a url mapping to the web.xml file, but
even there, you would want to check the generated servlet to make sure it
wasn't using container-dependent code. 

Greg Trasuk, President
StratusCom Manufacturing Systems Inc. - We use technology to turn
information into profits on your plant floor.
http://stratuscom.ca

-Original Message-
From: Eitan Ben-Noach [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:19 PM
To: [EMAIL PROTECTED]
Subject: using pre-compiled JSPs


Hello,

I would like to know whether pre-compiled JSPs is a conventional way for
deploying JSPs at the customers sites? Are there any disadvantages with
this approach?

Thanks,

Eitan Ben-Noach

 winmail.dat


improper JSP, or Tomcat bug?

2001-07-10 Thread Gregory Guthrie

I am trying to use a simple JSP page that tests for an existing Bean, and
uses the pre-existence of it as a logic branch by putting some code in
the initialization part of the jsp:usebean, and then a %return;%
statement.
But,
I find that both Tomcat and Websphere put some code after my last code in
the init branch, and thus it becomes invalid Java.
 !-- Access bean, else
create --
 jsp:useBean id=msg class=String
scope=session
 New.
 % return; %
 /jsp:useBean
 Old.
Is this valid JSP? If not, where is the spec. section that would
pertain to this?
It seems logical...!  :-)
Error: 500
Location: /test/aTest_1.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for
JSPE:\Net\Apache\Tomcat\work\localhost_8080%2Ftest\_0002faTest_0005f_00031_0002ejspaTest_0005f1_jsp_0.java:85:
Statement not reached.

out.write(\r\n\r\n);
Thanks.

---
Gregory Guthrie
MUM Faculty Mail - FM 1068
Farfield, IA 52557
http://www.mum.edu/~guthrie
(641)472-7773



RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS, Tomcat, U sing C:\Inetpub\wwwroot\test

2001-07-10 Thread Russell, Steve

Sounds Interesting!

What does that mean :)?...to create a context?

What would happen if someone deleted that line?

Steve

Steve Russell

Web Developer III
ValueOptions - Lifescape
703-205-6589
[EMAIL PROTECTED]


-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 12:34 PM
To: [EMAIL PROTECTED]
Subject: RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS,
Tomcat,  U sing C:\Inetpub\wwwroot\test



Your problem was related to the line in the default server.xml file:
ContextInterceptor className=org.apache.tomcat.context.AutoSetup
/
which will create a context for each directory or WAR in the webapps
directory.

Randy

 -Original Message-
 From: Russell, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 11:05 AM
 To: '[EMAIL PROTECTED]'
 Subject: Hidden Gotcha - How To Avoid A 404 - Integrating 
 IIS, Tomcat, 
 U sing C:\Inetpub\wwwroot\test
 
 
 Hi;
 
 I just spent some time doing some hair pulling.  I figured it 
 out and I
 thought I would post what I learned here so that it would 
 make it into the
 archives.
 
 Here is what I did:
 I integrated Tomcat 3.2 with IIS 5 on windows 2000.
 
 I made a test.jsp page that worked in C:\Inetpub\wwwroot  any
 subdirectory there of.
 
 However, I kept getting a 404 for test.jsp when I put it in
 C:\Inetpub\wwwrooot\test\
 
 It turns out that Tomcat has a C:\Tomcat\webapps\test\
 
 It doesn't appear in server.xml, but when I added
 
 Context path=/test 
 docBase=C:/InetPub/wwwroot/test debug=0
 reloadable=true/ 
 
 to server.xml and rebooted tomcat the problem went away
 
 Good Luck
 
 Steve Russell
 
 Web Developer III
 ValueOptions - Lifescape
 703-205-6589
 [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Russell, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 9:22 AM
 To: '[EMAIL PROTECTED]'
 Subject: If Anyone Is Interested ..Potential For 
 IIS-Tomcat Install
 Pr ogram
 
 
 Hi;
 
 At my boss's request I PHP enabled our development server.
 
 I went to:
 http://www.php.net
 
 They had an install program there for integrating PHP with 
 IIS.  It was very
 nice.  No exxhageration, it took me less then 5min to get 
 everything going (
 I'm still having fun and games getting Tomcat  IIS to play nice ).
 
 Anyway, I thought I would mention it as it shows that there 
 is potential to
 control IIS programmatically,at least enough to write an 
 install for
 smooshing tomcat  IIS together.
 
 Since PHP is an open source thing I'm sure if there was some web
 server/windows/tomcat savvy programmer out there into writing 
 an install
 s/he could contact the appropriate folks to get some leads on help.
 
 A legion of people who have pulled their hair out to get 
 tomcat  IIS set up
 will be your best friends :)
 
 Steve
 
 Steve Russell
 
 Web Developer III
 ValueOptions - Lifescape
 703-205-6589
 [EMAIL PROTECTED]
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the sender by email, delete and destroy this message and its 
 attachments.
 
 
 **
 



test

2001-07-10 Thread David Bishop

testing, my subscription doesn't seem to be working.

-- 
To me vi is Zen.  To use vi is to practice zen. Every command is
a koan. Profound to the user, unintelligible to the uninitiated.
You discover truth everytime you use it. [EMAIL PROTECTED]

[EMAIL PROTECTED]



pre-compilation of JSP

2001-07-10 Thread Saritha Pula

hi all,
  I am working on pre-compilation of JSP 
But problem for me is when I type the following command
jspc -webxml c:\web.xml -uriroot c:\cosmo\jsp -webapp example.jsp
the above command automatically generates web.xml  but with no
contents in it
Java file is not generated for the specified JSP

it would be greatful if I can get some inputs on this
Pula

-Original Message-
From: Randy Layman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 9:50 AM
To: [EMAIL PROTECTED]
Subject: RE: using pre-compiled JSPs



I like it for two reasons:
1.  Performance
2.  Don't need to distribute JavaC with the application

The drawbacks as I see it:
1.  Recompiling the JSPs generally works better than updating
servlets for getting an update out while the server is running
2.  There isn't currently any good way of merging the generated
web.xml file with your web.xml file.  (Making automated builds relies on
inserting some special token to your web.xml file in order to do the
merge,
or requires building a process that reads your web.xml file, knows where
the
other xml file goes, and performs the merge for you).
3.  It can be confusing for new developers who don't quite
understand that file.jsp is really being handled by a servlet and that's
why
their changes to the file.jsp file are not seeming to take affect.

Randy


 -Original Message-
 From: Eitan Ben-Noach [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 12:19 PM
 To: [EMAIL PROTECTED]
 Subject: using pre-compiled JSPs
 
 
 Hello,
 
 I would like to know whether pre-compiled JSPs is a 
 conventional way for
 deploying JSPs at the customers sites? Are there any 
 disadvantages with
 this approach?
 
 Thanks,
 
 Eitan Ben-Noach
 



Tomcat 3.2 freezing on .....initializing service: ResourcesService.

2001-07-10 Thread Joe . Bogushefsky
Title: Tomcat 3.2 freezing on .initializing service: ResourcesService.





I am currently doing a proof-of-concept project using Jetspeed for Enterprise-wide Corporate Portal development.


We are using...SuSe 7.1 Linux, Apache Web Server 1.3.14, Tomcat 3.2.2, Jetspeed 1.3a1, Ant, JDK1.3.1, JRE 1.3.1


I have been frustrated with the build and configuration process. (I can tell many others have also.)




Can anyone help me with the following problem?


-When starting Tomcat, Tomcat gets 'hung' at.initializing service: ResourcesService.
-Tomcat started just fine before adding Jetspeed 1.3a1 to TOMCAT_HOME/webapps
-I know that is not telling you much, but pointing me in some direction would be great!


Thanks!!!
Joe 



---
-Here are the messages when starting Tomcat:


jetspeed:/opt/jakarta/bin # ./startup.sh
Guessing TOMCAT_HOME from tomcat.sh to ./..
Setting TOMCAT_HOME to ./..
Using classpath: .:./../lib/META-INF:./../lib/ant-1.2.jar:./../lib/com:./../lib/jasper.jar:./../lib/javax:./../lib/org:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/lib/jdk1.3.1/lib/tools.jar:/opt/jakarta/jakarta-ant/lib:/opt/jakarta/jars:/opt/jakarta/lib:/opt/jakarta/jaxp-1.1:/opt/jakarta/jsse1.0.2/lib:/opt/jakarta/Jetspeed-1.3a1/lib:/opt/jakarta/Jetspeed-1.3a1/bin/classes:/opt/jakarta/Jetspeed-1.3a1/bin/:/opt/jakarta/Jetspeed-1.3a1/bin/Jetspeed.jar

jetspeed:/opt/jakarta/bin # Context log: path=/examples Adding context path=/examples docBase=webapps/examples
Context log: path= Adding context path= docBase=webapps/ROOT
Context log: path=/test Adding context path=/test docBase=webapps/test
Context log: path=/jetspeed Adding context path=/jetspeed docBase=webapps/jetspeed
Starting tomcat. Check logs/tomcat.log for error messages
Starting tomcat install=./.. home=/opt/jakarta classPath=.:./../lib/META-INF:./../lib/ant-1.2.jar:./../lib/com:./../lib/jasper.jar:./../lib/javax:./../lib/org:./../lib/servlet.jar:./../lib/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/lib/jdk1.3.1/lib/tools.jar:/opt/jakarta/jakarta-ant/lib:/opt/jakarta/jars:/opt/jakarta/lib:/opt/jakarta/jaxp-1.1:/opt/jakarta/jsse1.0.2/lib:/opt/jakarta/Jetspeed-1.3a1/lib:/opt/jakarta/Jetspeed-1.3a1/bin/classes:/opt/jakarta/Jetspeed-1.3a1/bin/:/opt/jakarta/Jetspeed-1.3a1/bin/Jetspeed.jar

Context log: path=/admin Automatic context load docBase=/opt/jakarta/webapps/admin Context log: path=/admin Adding context path=/admin docBase=/opt/jakarta/webapps/admin

Context log: path=/META-INF Automatic context load docBase=/opt/jakarta/webapps/META-INF
Context log: path=/META-INF Adding context path=/META-INF docBase=/opt/jakarta/webapps/META-INF
Context log: path=/servlets Automatic context load docBase=/opt/jakarta/webapps/servlets
Context log: path=/servlets Adding context path=/servlets docBase=/opt/jakarta/webapps/servlets
Context log: path=/jsp Automatic context load docBase=/opt/jakarta/webapps/jsp
Context log: path=/jsp Adding context path=/jsp docBase=/opt/jakarta/webapps/jspContext log: path=/WEB-INF Automatic context load docBase=/opt/jakarta/webapps/WEB-INF

Context log: path=/WEB-INF Adding context path=/WEB-INF docBase=/opt/jakarta/webapps/WEB-INF
Context log: path=/images Automatic context load docBase=/opt/jakarta/webapps/images
Context log: path=/images Adding context path=/images docBase=/opt/jakarta/webapps/images
Context log: path=/apidocs Automatic context load docBase=/opt/jakarta/webapps/apidocs
Context log: path=/apidocs Adding context path=/apidocs docBase=/opt/jakarta/webapps/apidocs
Context log: path=/search Automatic context load docBase=/opt/jakarta/webapps/search
Context log: path=/search Adding context path=/search docBase=/opt/jakarta/webapps/search
Context log: path=/about Automatic context load docBase=/opt/jakarta/webapps/about Context log: path=/about Adding context path=/about docBase=/opt/jakarta/webapps/about

Context log: path=/dynamic Automatic context load docBase=/opt/jakarta/webapps/dynamic
Context log: path=/dynamic Adding context path=/dynamic docBase=/opt/jakarta/webapps/dynamic
Context log: path=/ocs Automatic context load docBase=/opt/jakarta/webapps/ocs
Context log: path=/ocs Adding context path=/ocs docBase=/opt/jakarta/webapps/ocsContext log: path=/jcm Automatic context load docBase=/opt/jakarta/webapps/jcm

Context log: path=/jcm Adding context path=/jcm docBase=/opt/jakarta/webapps/jcmContext log: path=/css Automatic context load docBase=/opt/jakarta/webapps/css

Context log: path=/css Adding context path=/css docBase=/opt/jakarta/webapps/cssContext log: path=/rss Automatic context load docBase=/opt/jakarta/webapps/rss

Context log: path=/rss Adding context path=/rss docBase=/opt/jakarta/webapps/rssContext log: path=/wml Automatic context load docBase=/opt/jakarta/webapps/wml

Context log: path=/wml Adding context path=/wml docBase=/opt/jakarta/webapps/wmlContext log: path=/docs Automatic context 

Problems altering/adding contexts (zones?)

2001-07-10 Thread tomcat-list


I have some very basic problems with my Tomcat config.

I had a site that was working fairly well using Apache
1.3.14 and Jserv. I had installed the whole thing as a
single RPM. I wrote a collection of servlets using
Peter Mount's Postgresql JDBC 2.0 driver.

Well, not being the type to leave well enough alone, I
wanted to upgrade to Tomcat.

It works, sort of (http://jeromio.com/examples). The
examples, the test and admin stuff (although I can't
get past the login despite adding a user with an
admin role in tomcat-users.xml).

But for the life of me I can't get anything else to
work. I used to have
http://jeromio.com/servlets/servletname. I had a
working understanding of servlet zones in
mod_jserv. But I had to switch to mod_jk to get tomcat
to work.

I tried adding a servlet Context in the server.xml.
This seems to be pointing to the right directory now
(it displays the index.html file I have there), but
adding the name of a servlet to the URL results in
404. My servlets are all .class files - must I create
war files? I hope not. I've read all the docs I could
find and searched thru the archives of this list, but
I'm still lost on how to get a zone set up for
servlets.

Also, and I believe this is a related problem, I can't
get jetspeed to work. I copied the jetspeed .war file
to the webapps directory. Then I started tomcat and
the whole jetspeed directory tree under webapps
appeared. There's also lots of output related to
jetspeed during the tomcat startup, but
http://jeromio.com/jetspeed results in a 404. I have
tried adding explicit Context and directory tags to
the server.xml and the modjk.conf file (that gets
Included in my apache.conf file), but I've gotten
nowhere.

Seems like I am s close. Can anyone offer any
pointers?





problems viewing context in admin servlet

2001-07-10 Thread Gustavo Madeira Saramago - DISA.O








I'm having the same problem. I'd greatly appriciate any help too.

-

Hi all,
I installed tomcat 3.2.2 successfully and everything works fine,
example servlets and jsps. Only when I try to view the contexts
in the admin servlet I get the following error (below). I marked
the context as trusted and logged in as admin succesfully. I do not know
however what this error is about and could not find any information
on in. I'd greatly appriciate any help,
Dirk

So here's the servlets response:

Location: /admin/contextAdmin/contextAdmin.jspInternal Servlet Error:
javax.servlet.ServletException: URL contains encoded special chars.
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
 at
contextAdmin._0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0._jspService(_0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0.java:197)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at
org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at
java.lang.Thread.run(Thread.java:484)
Root cause: java.lang.IllegalArgumentException: URL contains encoded
special chars.
 at
org.apache.tomcat.util.RequestUtil.URLDecode(RequestUtil.java:317)
 at
ContextAdmin.getContextInfo(ContextAdmin.java:76)
 at
contextAdmin._0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0._jspService(_0002fcontextAdmin_0002fcontextAdmin_0002ejspcontextAdmin_jsp_0.java:135)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
 at
org.apache.tomcat.core.Handler.service(Handler.java:287)
 at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
 at
java.lang.Thread.run(Thread.java:484)










FW: If Anyone Is Interested ...

2001-07-10 Thread Russell, Steve


Don't reply directly to this message.its forwarded

-Original Message-
From: Miller, Paul [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 4:23 PM
To: '[EMAIL PROTECTED]'
Subject: RE: If Anyone Is Interested ...


Steve,

My name is Paul Miller and I was reading through the archives and get your
email.  I was wondering if you knew of why Tomcat would not be picking up on
the admin and example folders when integrated with IIS5.  I have a green
Arrow and everything. The Tomcat server also works on port 8080 just fine.
Any help would be great.  I tried to join the list, but I dhave not heard
anything back from them yet.  If you could also forward this to the list,
that would be great.  Any help is greatly appreciated.

Thanks,

Paul Miller


From: Russell, Steve 
Subject: If Anyone Is Interested ..Potential For IIS-Tomcat Install Pr
ogram 
Date: Tue, 10 Jul 2001 09:21:44 -0400 

Hi; At my boss's request I PHP enabled our development server. I went to:
http://www.php.net They had an install program there for integrating PHP
with IIS. It was very nice. No exxhageration, it took me less then 5min to
get everything going ( I'm still having fun and games getting Tomcat  IIS
to play nice ). Anyway, I thought I would mention it as it shows that there
is potential to control IIS programmatically,at least enough to write an
install for smooshing tomcat  IIS together. Since PHP is an open source
thing I'm sure if there was some web server/windows/tomcat savvy programmer
out there into writing an install s/he could contact the appropriate folks
to get some leads on help. A legion of people who have pulled their hair out
to get tomcat  IIS set up will be your best friends :) 

Steve Steve Russell 
Web Developer III 
ValueOptions - Lifescape 
703-205-6589 
[EMAIL PROTECTED]

** 
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender by email,
delete and destroy this message and its attachments.
** 



RE: using pre-compiled JSPs

2001-07-10 Thread Randy Layman



 -Original Message-
 From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 3:06 PM
 To: [EMAIL PROTECTED]
 Subject: RE: using pre-compiled JSPs
 
 
 One big disadvantage is that if you have precompiled JSP's, 
 your web application is no longer portable to different 
 servers (possibly not even across Tomcat versions, although 
 I'm not sure).  The reason is that the JSP spec does not 
 include any guidelines for naming or implementing the 
 generated servlet, i.e. it's implementation dependent.
 
 On the other hand, you could take the generated servlet, put 
 it into the WEB-INF/classes directory, and add a url mapping 
 to the web.xml file, but even there, you would want to check 
 the generated servlet to make sure it wasn't using 
 container-dependent code. 

I don't believe that this is correct.  If you use JSPC with the
right arguments it will produce a web.xml file fragment that includes the
servlet mappings and will produce standard .java files that you will need to
compile to .class files.

The only reason that you would have an incompability is if the other
container didn't implement the spec correctly (which you would have if you
moved the JSPs anyways).

Randy



RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS, Tomcat, U sing C:\Inetpub\wwwroot\test

2001-07-10 Thread Randy Layman



 -Original Message-
 From: Russell, Steve [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 3:18 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS,
 Tomcat,  U sing C:\Inetpub\wwwroot\test
 
 
 Sounds Interesting!
 
 What does that mean :)?...to create a context?
Instead of you having to define the Context in the server.xml file, it calls
the same API as would be called.  To the Tomcat server, it appears that you
configuration includes all of these extra lines, when the server.xml file
doesn't actually include them.

 
 What would happen if someone deleted that line?
Then you would not have several contexts automatically loaded (admin, and
test from personal experience, perhaps others).  No other side effects that
I know of.
 
 Steve
 
 Steve Russell
 
 Web Developer III
 ValueOptions - Lifescape
 703-205-6589
 [EMAIL PROTECTED]
 
 
 -Original Message-
 From: Randy Layman [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 10, 2001 12:34 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Hidden Gotcha - How To Avoid A 404 - Integrating IIS,
 Tomcat,  U sing C:\Inetpub\wwwroot\test
 
 
 
   Your problem was related to the line in the default 
 server.xml file:
 ContextInterceptor 
 className=org.apache.tomcat.context.AutoSetup
 /
 which will create a context for each directory or WAR in the webapps
 directory.
 
   Randy
 
  -Original Message-
  From: Russell, Steve [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 10, 2001 11:05 AM
  To: '[EMAIL PROTECTED]'
  Subject: Hidden Gotcha - How To Avoid A 404 - Integrating 
  IIS, Tomcat, 
  U sing C:\Inetpub\wwwroot\test
  
  
  Hi;
  
  I just spent some time doing some hair pulling.  I figured it 
  out and I
  thought I would post what I learned here so that it would 
  make it into the
  archives.
  
  Here is what I did:
  I integrated Tomcat 3.2 with IIS 5 on windows 2000.
  
  I made a test.jsp page that worked in C:\Inetpub\wwwroot  any
  subdirectory there of.
  
  However, I kept getting a 404 for test.jsp when I put it in
  C:\Inetpub\wwwrooot\test\
  
  It turns out that Tomcat has a C:\Tomcat\webapps\test\
  
  It doesn't appear in server.xml, but when I added
  
  Context path=/test 
  docBase=C:/InetPub/wwwroot/test debug=0
  reloadable=true/ 
  
  to server.xml and rebooted tomcat the problem went away
  
  Good Luck
  
  Steve Russell
  
  Web Developer III
  ValueOptions - Lifescape
  703-205-6589
  [EMAIL PROTECTED]
  
  
  -Original Message-
  From: Russell, Steve [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 10, 2001 9:22 AM
  To: '[EMAIL PROTECTED]'
  Subject: If Anyone Is Interested ..Potential For 
  IIS-Tomcat Install
  Pr ogram
  
  
  Hi;
  
  At my boss's request I PHP enabled our development server.
  
  I went to:
  http://www.php.net
  
  They had an install program there for integrating PHP with 
  IIS.  It was very
  nice.  No exxhageration, it took me less then 5min to get 
  everything going (
  I'm still having fun and games getting Tomcat  IIS to play nice ).
  
  Anyway, I thought I would mention it as it shows that there 
  is potential to
  control IIS programmatically,at least enough to write an 
  install for
  smooshing tomcat  IIS together.
  
  Since PHP is an open source thing I'm sure if there was some web
  server/windows/tomcat savvy programmer out there into writing 
  an install
  s/he could contact the appropriate folks to get some leads on help.
  
  A legion of people who have pulled their hair out to get 
  tomcat  IIS set up
  will be your best friends :)
  
  Steve
  
  Steve Russell
  
  Web Developer III
  ValueOptions - Lifescape
  703-205-6589
  [EMAIL PROTECTED]
  
  
  
  
 **
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error 
 please notify
  the sender by email, delete and destroy this message and its 
  attachments.
  
  
  
 **
  
 



getting same context accross virtual hosts

2001-07-10 Thread Stefanos Karasavvidis

I'm using tomcat 3.2.2 with several configured virtual servers in one JVM.
I want to share an object across the various virtual hosts.

I'm using for this the
getServletContext().setAttribute(name,object)
in one servlet, and then I try to retrieve this object from a servlet in 
another virtual host with
getServletContext().getContext(uri).getAttribute(name)

well, it doesn't work, and this is because each 
getServletContext().getContext(uri) call returns a different instance of 
org.apache.tomcat.facade.ServletContextFacade depeding on the virtual 
host the sevlets are called from

for the uri, I tried several "versions", using the context name (say 
foo) like "/foo" and the virtual servers name like
"/host1/foo" and the ip address like "/ip/foo".
 For the same virtual host, all these uri return the same instance, 
except from the virtual host the attribute
was first set which returns a different instance for the uri's with the 
hostname.
Across the virtual hosts, the instance is always different

How do I specify the uri to get the same (and correct) instance of my 
context??

This method of information sharing was introduced for this purpose, 
wasn't it??

Stefanos





RE: Please help Please Help

2001-07-10 Thread HGhoreishi
New to java.
 I want to create my environmet variables (tomcat_home).
 My programs are in 
C:\java\tomcat\jakarta-tomcat-3.2.2\jakarta-tomcat-3.2.2
 How do I go about it. Please help.
 Regards hossein.
 .


Re: Hi Pete, help regarding running Tomcat with SSL

2001-07-10 Thread pete

Manjunath,

I am running a Self-signed certificate with Tomcat on Linux (Mandrake 
8.0, kernel 2.4.5)

As i said before you need to build tomcat from source, with jsse.jar, 
jcert.jar etc. (the file i got from Sun that contains these is 
jsse-1_0_2-gl.zip ) in your classpath.

The Ant build process will automatically SSL-enable tomcat during the 
build process if jsse.jar is found.

For more detail on  building and configuring an SSL-enabled tomcat, you 
need to follow the instructions at:

http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-ssl-howto.html

After you have built, you need to use 'keytool' to create and install a  
certificate.

I have only installed a certificate that i created myself with OpenSSL - 
Not sure if this is available on Windows.

If you need to use a 3rd party certificate, you may have to convert it 
to the correct format required by keytool. There is a utility to do this 
available on the net, but i can't find it right now.

If you follow the instructions in the docs, you should get a working 
SSL-tomcat.

-Pete



 Hi Pete,
 
 U've said that u r running Tomcat with SSL. R u  using CA cert or Self 
 signed cert.
 
 Please help me. My environment is NT+IIS+Tomcat
 
 Thanks in advance
 
 Manjunath
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.






Ack! I spoke to soon...

2001-07-10 Thread Bryan Coon

So I was wrong (Im brain fried from setting this thing up today)...

My servlets are NOT working :(

http://myserver/examples/servlets/

shows the index page properly for the servlets.  It is identical to 
http://myserver:8080/examples/servlets/

I jumped the gun and thought, Whoohoo! It works!.
However, clicking on any of the servlet links generates an internal server
error.

The error message from mod_jk.log is this:
[jk_ajp12_worker.c (503)]: ajp12_handle_response, error reading header line

What the heck is this?  What did I do wrong?  How do I fix it?
If more info is needed, let me know what and Ill post it.

Thanks!
Bryan

Summary installation log:
On a Redhat 6.2 box:
Apache 1.3.20 compiled with OpenSSL 0.9.6b and MM 1.1.3.
Tomcat 3.2.2 Compiled and installed
compiled and installed mod_jk.so
added include path to tomcat conf/mod_jk.conf-auto to httpd.conf
http  https check out fine
tomcat checks out fine
apache can serve static pages fine from tomcat
no servlets work...



RE: instantDB in development

2001-07-10 Thread Jann VanOver

Um, what does this have to do with Tomcat?  

-Original Message-
From: Kemp Randy-W18971 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 10:18 AM
To: '[EMAIL PROTECTED]'
Subject: instantDB in development


I am playing with accessing databases on instantDB in development.  Can
someone give me the equivalent code in instandDB, for the code I use with
Oracle (as far as classname and url goes, given I have the drivers correctly
loaded)?

  String username = duck;
String password = daffy;  
String url=jdbc:oracle:thin:@this.is.a.fake.name:1521:helpme; 
Connection con;
//  String query = SELECT * FROM alex_course;
String query = SELECT * FROM me_job_entry;
Statement stmt;


try {
Class.forName(oracle.jdbc.driver.OracleDriver);
}
catch (java.lang.ClassNotFoundException e) {
System.err.print(ClassNotFoundException: );
System.err.println(e.getMessage());
}



Server or hotspot?

2001-07-10 Thread Ben Parker

I would grateful to hear whether client, server or hotspot is regarded as
the better setting in TOMCAT_OPTS for a busy site using Linux 2.2.14 SMP,
Sun JDK 1.3.1, mod_jk.

I think I have implemented the export _JAVA_SR_SIGNUM=12 fix to stop signal
11 errors. In fact, server seems to crash pretty quickly... but maybe that's
something else we've got wrong...


Thanks,

Ben






can run tomcat on linux servlets but not jsp's

2001-07-10 Thread DA Schaupner

Hi:

I am trying to run Tomcat on Linux 2.2.  I have been able to run Tomcat with
JRE1.2, but not been able to run any of the example jsp's (i have been able
to run the servlets).


I think i've set the CLASSPATH properly
(TOMCAT_HOME/webapps/example/WEB-INF/classes, TOMCAT_HOME/src).  Again, no
good.

Do I need to upgrade my java?  If so, which?  I believe that TOMCAT_HOME and
JAVA_HOME have been set properly.

Thanks
Dan
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




RE: can run tomcat on linux servlets but not jsp's

2001-07-10 Thread Artigas, Ricardo Y.

If I'm not mistaken, I believe you need the jdk installed not just the jre.
HTH.

:^)
Ricky Y. Artigas
Analyst/Programmer /
Database Administrator
Information Technology Division
Easycall Communications Phils., Inc.
- Easycall Internet -
418 Arayat St., Mandaluyong City 1550, Philippines
Company Website: http://www.easycall.com.ph
Tel.no: (+632) 5338001 ext.6574
Mobile:(+63) 0917-8951783
Pager:  141-002955
Email: [EMAIL PROTECTED]


 ---
 IMPORTANT NOTICE: 
  
 This message (and any attachment hereto) may contain privileged and/or
 confidential information specific to EasyCall. If you are not the intended
 addressee indicated in this message, you may not copy or disseminate this
 message (or any attachment hereto) to anyone. Instead, please destroy this
 message (and any attachment hereto), and kindly notify the sender by reply
 email. Any information in this message (and any attachment thereto) that
 do not relate to the official business of EasyCall shall be understood as
 neither given nor endorsed by the company.
 
 
 -Original Message-
 From: DA Schaupner [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, July 11, 2001 9:02 AM
 To:   [EMAIL PROTECTED]
 Subject:  can run tomcat on linux  servlets but not jsp's
 
 Hi:
 
 I am trying to run Tomcat on Linux 2.2.  I have been able to run Tomcat
 with
 JRE1.2, but not been able to run any of the example jsp's (i have been
 able
 to run the servlets).
 
 
 I think i've set the CLASSPATH properly
 (TOMCAT_HOME/webapps/example/WEB-INF/classes, TOMCAT_HOME/src).  Again, no
 good.
 
 Do I need to upgrade my java?  If so, which?  I believe that TOMCAT_HOME
 and
 JAVA_HOME have been set properly.
 
 Thanks
 Dan
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com



Installation of mod_jk.so at AIX 433

2001-07-10 Thread emendoza

Hi! Greetings!
I really am having problems in installing mod_jk.so over my RS machine. I
always get errors in compilation.. And i need to install it at once.. Is
there anyone who could possible give me the exact procedure or needed files
just to compile this into my machine? Please i need help on this.. It done
a couple of mixtures in the command at apxs. and i come up to error
such as rc=255, sometimes; rc=1 or 0... i guess , i have ecncountered every
error.. and even the dlopen.c comlilation error...
There were some issues at the web that i have to place dlfcn.h and dlopen.c
also.. so i did it... but i still cant compile the mod_so.c, can somebody
help me please..

Email me at once .. THANKS a lot in advance...

Edmon Mendoza
RS6000 Systems Engineer
ISP Services Pte Ltd
Tel. no. 7888-681
[EMAIL PROTECTED]




Re: Memory Leak Problem?

2001-07-10 Thread Dan Hinojosa

Did you close you I/O objects?  That can cause more memory usage.

John Clark Naldoza y Lopez wrote:

 Hi,

 I'm involved in a project using Tomcat 3.2.2 on Solaris 2.6 with JDK
 1.3.0_02.

 We have a web-app that has a lot of intensive File I/O.  And it uses
 sessions.

 When we logged in and did some intensive I/O process, switching between
 the different apps quickly, it was observed that the memory usage
 gradually increased.  After waiting for some time, the memory usage did
 not come down.

 Is there any memory leak problem with Tomcat's 3.2.2 session management?

 Would a memory leak occur if your tomcat server cannot write to the web
 client's TCP socket?  (Which does occur when switching between these
 applications from the web client.)

 Cheers,

 John Clark
 --
  /) John Clark Naldoza y Lopez   (\
 / )Software Design Engineer II   ( \
   _( (__  Web-Application Development_) )_
  (((\ \  /_Cable Modem Network Management System _\  / /)))
  ( \_/ / NEC Telecom Software Phils., Inc.  \ \_/ )
   \   /  \   /
\_/  phone: (+63 32) 233-9142 loc. 3112\_/
/   /  cellphone: (+63 919) 399-4742 \   \
   /   / email: [EMAIL PROTECTED]\   \





Tomcat/Apache with SSL

2001-07-10 Thread Suresh Krishna M (RBIN/DBA-JOT)

Hello all,
 Please let me know how to use SSL in Tomcat and Oracle 9iAS (if
anybody are using) .What are the prerequisites for this and i am using WinNT
box.I want to use the HTTPS protocol for some secured connections and i am
not able to see anything related in apache or tomcat.please help

THANX IN ADVANCE

The greatest thing that you would ever learn is just to Love and to be Loved
in return  --Anonymous 

With best regards,
M.S.Krishna (RBIN/DBA-JOT)
 Phone*: +91-80-508-1416
Fax : +91-80 571-1865
E-mail : [EMAIL PROTECTED]
Robert Bosch India Limited,
123,Industrial Layout,
Koramangala,
Bangalore-95.





RE: Tomcat/Apache with SSL

2001-07-10 Thread Richard Allwood

Check out
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-ssl-howto.html 

there are similar documents for tomcat 3.3, and tomcat 4.0 I think.


-Original Message-
From: Suresh Krishna M (RBIN/DBA-JOT) [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2001 16:02
To: [EMAIL PROTECTED]
Subject: Tomcat/Apache with SSL


Hello all,
 Please let me know how to use SSL in Tomcat and Oracle 9iAS (if
anybody are using) .What are the prerequisites for this and i am using WinNT
box.I want to use the HTTPS protocol for some secured connections and i am
not able to see anything related in apache or tomcat.please help

THANX IN ADVANCE

The greatest thing that you would ever learn is just to Love and to be Loved
in return  --Anonymous 

With best regards,
M.S.Krishna (RBIN/DBA-JOT)
 Phone*: +91-80-508-1416
Fax : +91-80 571-1865
E-mail : [EMAIL PROTECTED]
Robert Bosch India Limited,
123,Industrial Layout,
Koramangala,
Bangalore-95.




Configuring apache/tomcat with mod_jk on different hosts

2001-07-10 Thread Raymond

Hello

If apache and tomcat are running on 2 different hosts, how do I perform the
configuration if I'm using mod_jk ? For e.g. should I place the
workers.properties file on apache side or tomcat side ? For mod_jserv I know
that I can use ApJServDefaultHost and ApJServDefaultPort directives.

Thanks  Regards
Raymond





SSL Redirect To Port 80

2001-07-10 Thread Jim Prior

Hi,

I'm running Tomcat 3.2.1 standalone on Windows 98.

Using a normal HTTP connector, I can enter http://server/ on my browser
and be successfully redirected to http://server/index.html

However, if I use SSL, https://server/ will be redirected to port 80 rather
than 443.  If I use https://server/index.html I connect (via SSL at port
443) no problem.

The best clue I've found on the archive is:

http://w4.metronet.com/~wjm/tomcat/2000/Sep/msg00576.html

But, the secure parameter doesn't have any effect.

Any suggestions as to where I should look next?

IATY.





Re: Reloading

2001-07-10 Thread Boris Niyazov

Hi Hector,

This question has been asked several times and it seems nobody wants to answer 
it. I did ask similar question too a couple months ago with the same result :-(
I do not think I know the exact answer, but from my experience I see the 
following.
1. classes must be in WEB-INF/classes in order to be reloaded (Tomcat doc)
2. reloading is experimental feature and there is no guarantee that clases other 
than servlets will be reloaded.
3. one can see intermittent problems with class reloading in tomcat (I 
personally use 3.2.1) even if condition 1 is true.
 
I am not sure how tomcat reloading is implemented but it seems that reloading 
problems happens if the class to be reloaded keeps a reference to an existing 
object. In our case it happens during some exceptions that are not properly 
handled by developers (for ex, due to sql errors db connection is not returned 
to a pool or not closed). Then the object is not destroyed during reloading. 
Making code clean like proper releasing resorses avoids relaoding problems in 
our case.

Try to look at your code and make sure your servlets close all references 
properly especially when there are exceptions. 

hth
*
* Boris NiyazovPh:  212-854-4094  Fax: 212-854-1749 *
* Systems Manager  Email: [EMAIL PROTECTED] * 
* Columbia Law School  URL: http://www.law.columbia.edu *
*  
 
   
 


Hi servleters:
   I've making some tests trying to resolve when and how Tomcat does
a servlet reloading. The spec says that when a servlet container makes
a servlet reloading, it must discard all classes previouslly loaded for its
context. This really works for Tomcat, but it doesn't work very well, at
least for me. For example, if I change two servlets and some utility classes,
one of the servlets and the utility classes, are reload, but no both of the
servlets (not every time). I'm using Tomcat 3.2.2 with mod_jk / ajp13,
Windows NT 4.0 SP6, JDK 1.2.2_008, Apache 1.3.20. I've read the
release notes too.
   Does anybody know where I can find some useful information about
this topic.
   Thanks in advance.

Hector Adolfo Alonso
Consist Teleinformatica S. A.








Tomcat-servlet at startup

2001-07-10 Thread Lakshminarayanan Ramakrishnan
Title: Tomcat-servlet at startup






Hi


Tomcat loads the servlet class at startup, as far as my knowledge goes it functions properly, but when i look into tomcat.log, 

it is something like this, pls look at the the highlighted text, it says null, what does it mean?, and moreover, two contexts are present one empty and the other /root

2001-07-10 08:50:16 - Ctx( /examples ): Add context

2001-07-10 08:50:16 - ContextManager: Adding context Ctx( /examples )

2001-07-10 08:50:17 - Ctx( /admin ): Add context

2001-07-10 08:50:17 - ContextManager: Adding context Ctx( /admin )

2001-07-10 08:50:17 - Ctx( /root ): Add context

2001-07-10 08:50:17 - ContextManager: Adding context Ctx( /root )

2001-07-10 08:50:17 - ContextManager: Engine init

2001-07-10 08:50:17 - Ctx( ): Add context

2001-07-10 08:50:17 - ContextManager: Adding context Ctx( )

2001-07-10 08:50:17 - Ctx( /test ): Add context

2001-07-10 08:50:17 - ContextManager: Adding context Ctx( /test )

2001-07-10 08:50:17 - Ctx( /examples ): Context Init 

2001-07-10 08:50:17 - Ctx( /examples ): Pre servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /examples ): Post servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /admin ): Context Init 

2001-07-10 08:50:17 - Ctx( /admin ): Pre servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /admin ): Post servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /root ): Context Init 

2001-07-10 08:50:17 - Ctx( /root ): Removing duplicate servlet jsp jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /root ): Removing duplicate *.jsp - jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /root ): Pre servlet init HangFung(JWLStartUp.JWLLoadDefaults/null)

2001-07-10 08:50:17 - Ctx( /root ): Post servlet init HangFung(JWLStartUp.JWLLoadDefaults/null)

2001-07-10 08:50:17 - Ctx( ): Context Init 

2001-07-10 08:50:17 - Ctx( ): Removing duplicate servlet jsp jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( ): Removing duplicate *.jsp - jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( ): Pre servlet init HangFung(JWLStartUp.JWLLoadDefaults/null)

2001-07-10 08:50:17 - Ctx( ): Post servlet init HangFung(JWLStartUp.JWLLoadDefaults/null)

2001-07-10 08:50:17 - Ctx( /test ): Context Init 

2001-07-10 08:50:17 - Ctx( /test ): Pre servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:17 - Ctx( /test ): Post servlet init jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 08:50:19 - PoolTcpConnector: Starting HttpConnectionHandler on 8080

2001-07-10 08:50:19 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007

2001-07-10 09:05:13 - ContextManager: Removing context Ctx( /examples )

2001-07-10 09:05:13 - Ctx( /examples ): Remove context

2001-07-10 09:05:13 - Ctx( /examples ): Pre servlet destroy jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 09:05:13 - Ctx( /examples ): Post servlet destroy jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 09:05:13 - Ctx( /examples ): Context Shutdown 

2001-07-10 09:05:13 - ContextManager: Removing context Ctx( /admin )

2001-07-10 09:05:13 - Ctx( /admin ): Remove context

2001-07-10 09:05:13 - Ctx( /admin ): Pre servlet destroy jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 09:05:13 - Ctx( /admin ): Post servlet destroy jsp(org.apache.jasper.servlet.JspServlet/null)

2001-07-10 09:05:13 - Ctx( /admin ): Context Shutdown 


thanx in adv


Lax





help me with IIS+tomcat

2001-07-10 Thread Ðì±ó

Hi,
I have tried everything writen in Tomcat IIS HowTo but when I entered 
http://bsd.com/examples/jsp/index.html; (My win 2000 server's IIS web server's name 
is bsd.com), the browser always says a error of HTTP 404. I think the url is right 
because if I entered http://bsd.com:8080/examples/jsp/index.html;, the browser can 
correctly display tomcat jsp examples page. The isapi filter is also loaded, the 
workers is setting right. I use Jbuilder4 and download tomcat 3.2.2 and install it 
under c:\JBuilder4\tomcat. I have changed workers.properties's java_home and 
tomcat_home properties. It still NOT works. can you give me some information?