POST file via Form O'Reilly lib Tomcat problems

2001-06-22 Thread Adam Kirby

I'm having problems trying to upload a file to a servlet.

The problem occurs when we use a HTML form to POST a binary to a
servlet.  Very small files (~100 bytes) work fine but anything above
(~350 bytes) throws the exception listed 
below.

Tomcat version is 3.2.1, the server is Red Hat Linux release 7.0, Kernel 
2.2.16-22.  We are using Jason Hunter's multipart request handling
servlets 
(www.servlets.com/cos).

Shifting to 3.2.2 and 3.3-m3 did not resolve the issue.  Shifting to
Tomcat 4.0-b5 did resolve this problem but raised others
(request.getParameter(String) did not function).

The problem is listed in the FAQ for Jason Hunter's library
(http://www.faqtory.com/servlets/) but the solution seems outdated.

Searching the archives for this list gave similar cases of this problem,
but no solutions that worked for me.  The list commonly suggested that
it was a bug with AJP13 and that reverting back to AJP12 will fix. 
However, I've checked our conf/tomcat.conf file which claims we are
using AJP12.

Any ideas, work-arounds or feedback will be greatly appreciated.

Thanks,

Adam.

The stack-trace for the exception thrown by Tomcat 3.2.1 is:

2001-06-21 04:08:17 - ContextManager: Error reading request, ignored - 
java.lang.ArrayIndexOutOfBoundsException
at 
org.apache.tomcat.service.http.HttpRequestAdapter.parseHeaderFiled(HttpRequestAd
apter.java:224)
at 
org.apache.tomcat.service.http.HttpRequestAdapter.readHeaders(HttpRequestAdapter
.java:205)
at 
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRequestAda
pter.java:140)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConne
ctionHandler.java:1
95)
at 
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at 
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)




RE: Problems with ajp13, mod_jk, and load balancer

2001-06-22 Thread GOMEZ Henri

I'm having problems getting ajp13 working reliably with mod_jk 
and the load
balancer. Here is my configuration:

- 4 Sun Solaris Sparc machines with similar setup
- Apache 1.3.20
- Tomcat 3.2.2
- mod_jk compiled from Tomcat 3.2.2 source
- JDK 1.2.2
- Cisco Local Director sitting in front of Solaris machines, doing load
balancing
- Running servlet based application which uses HTTP sessions, by use of
cookies.

On all four machines, I have the Tomcat workers.properties set 
up to load
balance between all four machines, with lbfactor=1 and 
type=ajp13. The worker
names are the same in all four files with the same host. 
Everything seems to
work fine until I click reload on the browser a good 20-25 
times when viewing a
servlet generated page. My application (which uses HTTP 
sessions stored on the
server) complains about an invalid session (basically it can't 
find the session
information for the session id passed). I turned the prompt 
for cookies
option on in my browser and found that after a good number of 
clicks, it tries
to issue me a new cookie from a different Tomcat! It looks 
like under heavy
load the load balancer tries to send me to a different Tomcat 
even though the
session id contains the worker name (ex. a164gy8s01.www3, 
where www3 is worker
name).

I then tried the same test with a Linux machine running Apache 
1.3.20 and
Tomcat 3.2.2. When clicking heavily, I get a 500 Server error. 
I noticed in the
jk_mod log file, it complains about no workers being available.

If I switch from ajp13 to ajp12, everything works fine in both 
scenarios
mentioned above. No 500 server errors or invalid sessions 
caused by the request
going to the wrong Tomcat. Is there a bug in ajp13 or is there 
some kind of
configuration I can tweak?

Send us the server.xml and httpd.conf !=)
I feel that you have to less java threads available



[Fwd: How to avoid of displaying the XXXXXXXX file path]

2001-06-22 Thread Fritz Thielemann

Hi Helmut,

kannst du deinen mailer daemon in den griff bekommen. wir werden echt
ueberschwemmt. allein heute morgen habe ich mehr als 90 mails bekommen,
die dein daemon immer wieder rausjagt.

gruss Fritz



mazzen al-najjar wrote:
 i have already notified all the available contacts for the
 engnetworld.com domain.

if any of you are fluent in german, would you please apprise Helmut
Serüga [EMAIL PROTECTED], the systems administrator at
engnetworld.com, of the situation. i don't think he understood me and i
did not understand his reply.

beachtungen,

mazzy




Re: tomcat, and servlet testing in a multi-user environment

2001-06-22 Thread Jim Cheesman

At 06:20 PM 21/06/01, you wrote:
Hi!
We are several programmers who are programming servlets and jsp on our 
tomcat server, and each time we modify a servlet or a jsp, we have to 
restart tomcat so it takes in consideration our changes, and our problem 
is that we are working everyone from his computer at the same time, so 
when someone has made some changes and he wants to restart tomcat, it 
annoys the others who may be testing their servlet.
So is there a way to make tomcat aware of new changes without restarting 
it or should we install a tomcat on everyone's machine ?



We have tomcat on everyone's machine - plus a couple of servers. Works 
fine, with a couple of caveats:
1. We all have our own packages - no namespace conflicts - with a couple of 
utils packages that everyone can use.
2. Watch for classpath issues - it's real easy to mung your own classpath 
and then find that the code doesn't work on other machines. Same thing for 
people downloading code (xerces, xalan etc. libraries) and having different 
versions.

The idea of having an integration server is a great one, especially if 
you can combine that with a reasonable set of junit/cactus/httpunit tests, 
and clean builds. But, the flexibility of being able to start/stop your own 
server is essential IMHO.


Jim



--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
  Exaggeration is not 
all it's cracked up to be.





RE: mod_jk as static module

2001-06-22 Thread GOMEZ Henri

mod_jk present in jakarta-tomcat-connectors allow such build

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



-Original Message-
From: Sean M McGrath/AC/VCU [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 6:35 PM
To: [EMAIL PROTECTED]
Subject: mod_jk as static module


Can mod_jk be compiled as static module as opposed to Shared Object in
Apache?

My platform
AIX 4.3.3
Apache 1.3.12
Tomcat 3.2.2




server.xml

2001-06-22 Thread Webmaster LLBfrance.com



Hello, 

Where can i find recent complete reference for 
server.xml ?
I'm using tomcat 3.3

Thanks
JuanCarlos



TagLib Class Resolution Problem (TomCat 3.2.1)

2001-06-22 Thread Philip Weaver


Whenever I use my taglib from within the subdirectory pages, for example,
jasper complains that Class pages.SpecialConnectionTag not found in type
declaration. So, it appears to find the taglib but thinks that it's part of
a package? (which it's not)

I can work around this by keeping everything in one directory but how do I
solve this? I don't have the problem using the same pages in Resin so this
could be a configuration problem with Tomcat. Please help.

Thanks,
Philip



org.apache.jasper.JasperException: Unable to compile class for
JSP/Organize/Tomcat/jakarta-tomcat-3.2.1/work/localhost_8080%2Fphilmaker/_00
02fpages_0002findex_0002ejspindex_jsp_0.java:71: Class
pages.SpecialConnectionTag not found in type declaration.
SpecialConnectionTag _jspx_th_pjw_specialconnection_0 = new
SpecialConnectionTag();
^
/Organize/Tomcat/jakarta-tomcat-3.2.1/work/localhost_8080%2Fphilmaker/_0002f
pages_0002findex_0002ejspindex_jsp_0.java:71: Class
pages.SpecialConnectionTag not found in type declaration.
SpecialConnectionTag _jspx_th_pjw_specialconnection_0 = new
SpecialConnectionTag();
   
^
2 errors

at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
...

.




JSP Tag XML Syntax Problem (jsp:include, etc.)

2001-06-22 Thread Philip Weaver


I'm using Tomcat 3.2.1 and am unable to use the XML syntax of certain JSP
tags: 

jsp:include page=page.jsp/ [Error: Invalid jsp:include tag]
jsp:scriptlet/jsp:scriptlet

The same tags work in Resin. What could I be doing wrong?

Thanks,
Philip

org.apache.jasper.compiler.CompileException:
/Organize/Tomcat/jakarta-tomcat-3.2.1/webapps/philmaker//index.jsp(27,2)
Invalid jsp:include tag
at 
org.apache.jasper.compiler.IncludeGenerator.(IncludeGenerator.java:95)
...

.




XML parser: old version

2001-06-22 Thread Sergey V. Udaltsov

Hi all

With Tomcat 3.2.2 RPMS, I got some XML parser. 
I suspect it is sun's JAXP implementation 1.0. It DOES NOT support
namespaces (I found it from the error messages:) so it is not possible
to use XSL in JSPs/Beans/servlets.

Will it be any problem to use JAXP 1.1? Or Xerces? What is the current
policy of using XML parsers in tomcat? Why tomcat does not use Xerces
having the same Apache licence?

Thanks for any comments

Sergey



[POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread GOMEZ Henri

Hi Sergey,

With Tomcat 3.2.2 RPMS, I got some XML parser.
I suspect it is sun's JAXP implementation 1.0. It DOES NOT support
namespaces (I found it from the error messages:) so it is not possible
to use XSL in JSPs/Beans/servlets.

That's a known problem. I package these RPMs and asked previously
in tomcat-dev which parser used by default. Some proposed crimson,
others xerces-j (?).

Will it be any problem to use JAXP 1.1? Or Xerces? What is the current
policy of using XML parsers in tomcat? Why tomcat does not use Xerces
having the same Apache licence?


I launch that poll to see if which XML parser RPMS users want to
see included by default.

I could add xerces-j 1.4.0 or crimson 1.1 (from xml-crimson CVS or from
http://xml.apache.org/dist/crimson/crimson-1.1.zip)

FYI, I removed on all my sites (which use this RPM), jaxp.jar/parser.jar
and used xerces-j instead !



Re: XML parser: old version

2001-06-22 Thread Sam Newman

Someone said he managed to get Xerces work without too mich bother. He
simply wedited the tomcat.bat/tomcat.sh startup script to put the xerces xml
parser in the classpath instead of the standard one. My only guess as to why
xerces is not used by default is Tomcat's history as being Suns reference
implementation?

sam
- Original Message -
From: Sergey V. Udaltsov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 9:31 AM
Subject: XML parser: old version


 Hi all

 With Tomcat 3.2.2 RPMS, I got some XML parser.
 I suspect it is sun's JAXP implementation 1.0. It DOES NOT support
 namespaces (I found it from the error messages:) so it is not possible
 to use XSL in JSPs/Beans/servlets.

 Will it be any problem to use JAXP 1.1? Or Xerces? What is the current
 policy of using XML parsers in tomcat? Why tomcat does not use Xerces
 having the same Apache licence?

 Thanks for any comments

 Sergey





Re: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread Sergey V. Udaltsov

 I launch that poll to see if which XML parser RPMS users want to
 see included by default.
Probably no XML parser should be included. . Just document the fact that
admin should synlink necessary jars to the tomcat lib directory. IMHO it
is wrong idea to include parser with any java app which requires it.
JAXP API makes this unnecessary (definitely unless Tomcat uses some
special private API from crimson or xerces). 

Regards,

Sergey



RE: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread GOMEZ Henri

 I launch that poll to see if which XML parser RPMS users want to
 see included by default.
Probably no XML parser should be included. . Just document the
fact that
admin should synlink necessary jars to the tomcat lib
directory. IMHO it
is wrong idea to include parser with any java app which requires it.
JAXP API makes this unnecessary (definitely unless Tomcat uses some
special private API from crimson or xerces).

If I didn't include a default XML parser, we'll receive just too many
emails from new users telling about 'tomcat couldn't find XML parser'.

The XML parser should be included in the distro since new and average
users MAY never use XML in their apps.

The experienced users in XML known what is JAXP, NAMESPACE, and also
know what parser they want to be used. Note that with TC 3.3/4.0 you'll
could use a different parser...

The real question is what could be a reasonable choice as XML for 
Tomcat (size, functionnalities, stability...)

I'll forward the POLL to general-xml and general-jakarta !:



Re: mysteriously dying connections (Oracle - tomcat)

2001-06-22 Thread Lukas Sägesser

i checked this over and over again. i really do return all the connetions.

- Original Message -
From: Ralph Einfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, June 21, 2001 5:30 PM
Subject: AW: mysteriously dying connections (Oracle - tomcat)


 It sounds to me like you're not alway returning the
 connection to the pool or not closing the connection.

 But this is hard to say without the source of your
 java class.


 If you use a connection pool where you have
 access to the source code, look if the get and release
 methods can be intrumented in a way to log each
 get and release with the hashcode of the connection.
 Otherwise log each call to get/release in your own code
 or build a wrapper object around the pool that log
 this information before calling the pool method.


  -Ursprüngliche Nachricht-
  Von: Lukas Sägesser [mailto:[EMAIL PROTECTED]]
  Gesendet: Donnerstag, 21. Juni 2001 16:38
  An: [EMAIL PROTECTED]
  Betreff: mysteriously dying connections (Oracle - tomcat)
 
 
  hi all!
 
  problem:
  
 
  database access is managed via a java class that is
  instantiated and loaded into each clients session. every
  PL/SQL function and/or SQL statement a client needs is
  called in a method of this class.
  first, a connection is opened, the statement is called,
  all resultsets and statements are closed and finally the
  connection is closed. (or returned back to the
  connection pool if one is used)
 
  the driver we use is the Oracle jdbc ThinDriver (jdbc
  driver type 4). after running the system for several
  days, dead connections (and as we just discovered, tons
  of open cursors) pile up.
  eventually the webserver(tomcat) will crash or just
  hang.
  in the process, access gets slower and slower, there may
  be delays of 3 minutes until the webserver (or, perhaps
  the database, in which case the webserver would be just
  waiting for the db..) gives a response.
  after a restart of the webserver or the database or
  both, the system runns very well again.
 
  we tried several connection pools. with these, there
  were no delays for getting a connection, but the pool
  threw timeoutExceptions (i.e. made it visible that there
  are hanging connections) and after a few hundred
  timeouts the VM crashed with a stack overflow.
 
  the connections seem to get killed/kill themselfes
  randomly no matter which function was called. we log the
  methods and statements that were called for the
  connections that die, but there is just no pattern in
  it. thats why we dont find the root of the problem.. is
  it the driver ? the database ? the tomcat ?
 
 
 
  environment:
  
 
  Web Server:
  Suse Linux 7.2
  Apache Webserver /w Tomcat JSP Engine 3.2 /w SSL
 
  DB Server:
  Suse Linux 7.2
  Oracle 8i 8.1.7 /w multi-threaded server (MTS)
 
  Backup Server:
  Oracle Shadow server
 
 
 
  things done:
  
 
  - linux update
  - apache update
  - tomcat update
  - jdbc thin driver update
  (everywhere the newest version)
  - tried several connection pools
 
 
 
  possible changes:
  -
 
  - use OCI drivers instead of thin driver
  - use J-serv with GNU_jsp instead of tomcat
 
 
 
 
  every help is welcome, we're frustrated to no ends.
  thanks very much in advance!!
 
  l.sägesser
 
 





Re: XML parser: old version

2001-06-22 Thread Stan Devitt

Correct.   Putting xerces.jar and xalan.jar at the start of the class path
seems to work fine.  

Stan D.

- Original Message - 
From: Sam Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 4:43 AM
Subject: Re: XML parser: old version


 Someone said he managed to get Xerces work without too mich bother. He
 simply wedited the tomcat.bat/tomcat.sh startup script to put the xerces xml
 parser in the classpath instead of the standard one. My only guess as to why
 xerces is not used by default is Tomcat's history as being Suns reference
 implementation?
 
 sam
 - Original Message -
 From: Sergey V. Udaltsov [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, June 22, 2001 9:31 AM
 Subject: XML parser: old version
 
 
  Hi all
 
  With Tomcat 3.2.2 RPMS, I got some XML parser.
  I suspect it is sun's JAXP implementation 1.0. It DOES NOT support
  namespaces (I found it from the error messages:) so it is not possible
  to use XSL in JSPs/Beans/servlets.
 
  Will it be any problem to use JAXP 1.1? Or Xerces? What is the current
  policy of using XML parsers in tomcat? Why tomcat does not use Xerces
  having the same Apache licence?
 
  Thanks for any comments
 
  Sergey
 
 
 
 




Verify OracleJSP installation instead of jasper

2001-06-22 Thread MAZARS Ludovic - TLS

Hi, 

I use tomcat 3.2.2 with Oracle 8.1.7. I want to replace Jasper with Oracle
JSP for using Jdeveloper. 
My file web.xml is modified following the description in the different
documentation. How can I verify Tomcat do not use Jasper ? 
I just modify this file, is there something more to do ?

thanks, Ludovic



AW: mysteriously dying connections (Oracle - tomcat)

2001-06-22 Thread Thomas Bezdicek

you can also look in V$SESSIONS or under unix
with netstat -a | grep 1521 how many connections
are established.

regards, tom

 -Ursprüngliche Nachricht-
 Von: Lukas Sägesser [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 22. Juni 2001 11:59
 An: [EMAIL PROTECTED]
 Betreff: Re: mysteriously dying connections (Oracle - tomcat)


 i checked this over and over again. i really do return all the connetions.

 - Original Message -
 From: Ralph Einfeldt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, June 21, 2001 5:30 PM
 Subject: AW: mysteriously dying connections (Oracle - tomcat)


  It sounds to me like you're not alway returning the
  connection to the pool or not closing the connection.
 
  But this is hard to say without the source of your
  java class.
 
 
  If you use a connection pool where you have
  access to the source code, look if the get and release
  methods can be intrumented in a way to log each
  get and release with the hashcode of the connection.
  Otherwise log each call to get/release in your own code
  or build a wrapper object around the pool that log
  this information before calling the pool method.
 
 
   -Ursprüngliche Nachricht-
   Von: Lukas Sägesser [mailto:[EMAIL PROTECTED]]
   Gesendet: Donnerstag, 21. Juni 2001 16:38
   An: [EMAIL PROTECTED]
   Betreff: mysteriously dying connections (Oracle - tomcat)
  
  
   hi all!
  
   problem:
   
  
   database access is managed via a java class that is
   instantiated and loaded into each clients session. every
   PL/SQL function and/or SQL statement a client needs is
   called in a method of this class.
   first, a connection is opened, the statement is called,
   all resultsets and statements are closed and finally the
   connection is closed. (or returned back to the
   connection pool if one is used)
  
   the driver we use is the Oracle jdbc ThinDriver (jdbc
   driver type 4). after running the system for several
   days, dead connections (and as we just discovered, tons
   of open cursors) pile up.
   eventually the webserver(tomcat) will crash or just
   hang.
   in the process, access gets slower and slower, there may
   be delays of 3 minutes until the webserver (or, perhaps
   the database, in which case the webserver would be just
   waiting for the db..) gives a response.
   after a restart of the webserver or the database or
   both, the system runns very well again.
  
   we tried several connection pools. with these, there
   were no delays for getting a connection, but the pool
   threw timeoutExceptions (i.e. made it visible that there
   are hanging connections) and after a few hundred
   timeouts the VM crashed with a stack overflow.
  
   the connections seem to get killed/kill themselfes
   randomly no matter which function was called. we log the
   methods and statements that were called for the
   connections that die, but there is just no pattern in
   it. thats why we dont find the root of the problem.. is
   it the driver ? the database ? the tomcat ?
  
  
  
   environment:
   
  
   Web Server:
   Suse Linux 7.2
   Apache Webserver /w Tomcat JSP Engine 3.2 /w SSL
  
   DB Server:
   Suse Linux 7.2
   Oracle 8i 8.1.7 /w multi-threaded server (MTS)
  
   Backup Server:
   Oracle Shadow server
  
  
  
   things done:
   
  
   - linux update
   - apache update
   - tomcat update
   - jdbc thin driver update
   (everywhere the newest version)
   - tried several connection pools
  
  
  
   possible changes:
   -
  
   - use OCI drivers instead of thin driver
   - use J-serv with GNU_jsp instead of tomcat
  
  
  
  
   every help is welcome, we're frustrated to no ends.
   thanks very much in advance!!
  
   l.sägesser
  
  
 





tip for users connecting over SSH to their tomcat server

2001-06-22 Thread Stephan Beal

For tomcat users who log in to their Unix servers over SSH:

ssh 2.9 has a bug where if you have any background processes running, 
on logout your SSH will hang. Adding nohup to tomcat.sh, just before 
the calls to $JAVACMD will alleviate this, but will also leave the file 
nohup.out in the dir you start tomcat.sh from:

nohup $JAVACMD...


- stephan
Generic Universal Computer Guy
[EMAIL PROTECTED] - http://www.einsurance.de
Office: +49 (89) 552 92 862   Handy: +49 (179) 211 97 67
...control is a degree of inhibition, and a system which is perfectly
inhibited is completely frozen. -- Alan W. Watts



RE: application error

2001-06-22 Thread Michael Wentzel

 Iam getting application error java.exe error while i fetch data from mssql

 server/mysql server thru dsn.when i enter ok/cancel the tomcat server
shutdown. 
 again i have to restart it. pls help me how to  get rid of this.

First off, go to the ODBC control panel and make sure you can connect to the
ODBC source through the control panel(using the test function at end of
configurator).
If this works explain in more detail, including source if possible, how you
make your connection in java.


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



RE: application error

2001-06-22 Thread Randy Layman


First, I would suggest that you post using plain text messages, more
people will be able to read your message, which is what you want, right?

Second, I believe that you have fallen victim to the JDBC-ODBC
Bridge threading problem.  From your message I believe that you are using
Windows (application error) with ODBC (dsn).  This combination does not
allow concurrent access to the data source.  This is a bug in the bridge and
you can find out more about it in Sun's Bug Parade, but the short version is
the Bridge is experimental and un-supported.

You can either try and make your Database requests one at a time
(which has performance implications) or you can find other drivers - there
are free type 4 JDBC drivers for mysql.  I assume mssql is Microsoft's SQL
Server.  For that you could look at freetds.org (haven't used) or
inetsoftware.de (use extensively, but they do cost).

Randy

-Original Message-
From: Pon Prabakaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 8:44 PM
To: [EMAIL PROTECTED]
Subject: application error


Hi
Iam getting application error java.exe error while i fetch data from mssql
server/mysql server thru dsn.when i enter ok/cancel the tomcat server
shutdown. again i have to restart it. pls help me how to  get rid of this.
 
thanx
Prabakar



RE: POST file via Form O'Reilly lib Tomcat problems

2001-06-22 Thread Randy Layman


Unfortunately I don't have an answer as to why you can't upload, but
I can give you a little information that might help you.

First, when using Jason Hunter's library, request.getParameter won't
work.  His library reads the entire posting and then provides methods to get
the parameters back.  So Tomcat 4m5 might work.

Second, you are not running Tomcat behind Apache or any other web
server.  Therefore, you are not using AJP13 or AJP12.  You are using HTTP as
your protocol (as the stack trace lists).  

I am using Tomcat 3.2.1 to receive binary files (on the order of
100K - 1M, Excel and Access files) without any problems over HTTP.  If this
request if coming from a program, I would look at how its building the
headers, because that is where the problem is (readHeaders).  Otherwise, I
don't think I can be of much help.

Randy


 -Original Message-
 From: Adam Kirby [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 2:14 AM
 To: [EMAIL PROTECTED]
 Subject: POST file via Form  O'Reilly lib  Tomcat problems
 
 
 I'm having problems trying to upload a file to a servlet.
 
 The problem occurs when we use a HTML form to POST a binary to a
 servlet.  Very small files (~100 bytes) work fine but anything above
 (~350 bytes) throws the exception listed 
 below.
 
 Tomcat version is 3.2.1, the server is Red Hat Linux release 
 7.0, Kernel 
 2.2.16-22.  We are using Jason Hunter's multipart request handling
 servlets 
 (www.servlets.com/cos).
 
 Shifting to 3.2.2 and 3.3-m3 did not resolve the issue.  Shifting to
 Tomcat 4.0-b5 did resolve this problem but raised others
 (request.getParameter(String) did not function).
 
 The problem is listed in the FAQ for Jason Hunter's library
 (http://www.faqtory.com/servlets/) but the solution seems outdated.
 
 Searching the archives for this list gave similar cases of 
 this problem,
 but no solutions that worked for me.  The list commonly suggested that
 it was a bug with AJP13 and that reverting back to AJP12 will fix. 
 However, I've checked our conf/tomcat.conf file which claims we are
 using AJP12.
 
 Any ideas, work-arounds or feedback will be greatly appreciated.
 
 Thanks,
 
 Adam.
 
 The stack-trace for the exception thrown by Tomcat 3.2.1 is:
 
 2001-06-21 04:08:17 - ContextManager: Error reading request, 
 ignored - 
 java.lang.ArrayIndexOutOfBoundsException
 at 
 org.apache.tomcat.service.http.HttpRequestAdapter.parseHeaderF
 iled(HttpRequestAd
 apter.java:224)
 at 
 org.apache.tomcat.service.http.HttpRequestAdapter.readHeaders(
 HttpRequestAdapter
 .java:205)
 at 
 org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequ
 est(HttpRequestAda
 pter.java:140)
 at 
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(HttpConne
 ctionHandler.java:1
 95)
 at 
 org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoin
 t.java:416)
 at 
 org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPo
 ol.java:498)
 at java.lang.Thread.run(Thread.java:484)
 



RE: Verify OracleJSP installation instead of jasper

2001-06-22 Thread Randy Layman


How to replace Jasper I don't know, but if you what to check if
you're using Jasper simply add a syntax exception to a JSP file and then
look at the stack trace from the compile.  If you see the Jasper package
being used then you are still using Jasper.

Randy


 -Original Message-
 From: MAZARS Ludovic - TLS [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 6:43 AM
 To: [EMAIL PROTECTED]
 Subject: Verify OracleJSP installation instead of jasper
 
 
 Hi, 
 
 I use tomcat 3.2.2 with Oracle 8.1.7. I want to replace 
 Jasper with Oracle
 JSP for using Jdeveloper. 
 My file web.xml is modified following the description in the different
 documentation. How can I verify Tomcat do not use Jasper ? 
 I just modify this file, is there something more to do ?
 
 thanks, Ludovic
 



Internal server Error !!!

2001-06-22 Thread Nidhish Abraham


Sir ,

We are facing a problem related with session variables.
Our site consists of .jsp , .html files.Once we login to
the site two session variables are created TimeSpent,Login.

All pages from that are browsed after checks for session variable.
So if session variable is 'null' , it will not allow to browse through
other pages.These thing are working properly.

In our site we have an other option which is 'Search',which will query
keywords from the sites content and provide links to those pages.

The links which the 'Search'(which is a SERVELT : SearchServlet) returned 
are actual links to .jsp pages,( which was accessed earlier)
was not able to access by click on the link returned by 'SearchServlet'

The links returned are having links to the same .jsp pages.



Sir, Is it because the session being removed , when we redirect from a
Servlets
dynamic output or due to some other reasons.

The following error is obtained when we click on the link which was returned
by 
SearchServlet.

SearchServlet actually returns : path to the '.jsp' file.


Sample content : 
_
TNO  |  TNAME  |TDESC  | PNO
-
T1   | curl| curl [chapter : 10]   | vc10.jsp
__

==

Error :

 The page cannot be displayed 

There is a problem with the page you are trying to reach and it cannot be
displayed. 



Please try the following:

Open the localhost:8080 home page, and then look for links to the information
you want. 
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet. 
You can also see a list of related sites. 




HTTP 500 - Internal server error 
Internet Explorer  

===
With Regards

Nidhish
TLCinfotech







Runaway Thread Problem

2001-06-22 Thread Mark Stewart

I have searched through the archives and have found several people with
this problem, but nothing that seems to fix it. Any help would be
appreciated...

We are running Apache 1.3.19, Tomcat 3.2.2, mod_jk, ajp13. After a day
or so with a user load, our thread count continues to climb and threads
are not released. We are running PoolTcpConnector and have made sure
that threads are being released on our development site. We have a
script that monitors the threads every hour and they seem to just
increment throughout the day and  are never released. Once the thread
count reaches the 500 point, Tomcat stops responding. The apache server
continues to accept requests once Tomcat stops. Once we restart Tomcat,
the process cycles through again. Along with the thread count
increasing, memory usage climbs until there is 5-10 MB free.

We have moved the max threads value from 50-75-150-200 which didn't
change the symptoms. We move the session timeout in WEB-INF/web.xml to 5
with no help. We have tried simulating the user load on our development
environment but the thread count returns back to a normal level after
letting it idle for a few minutes. I'm guessing we have issues in our
application but have not been able to uncover them so far.

Again thanks for any insight into the problem.

Mark


begin:vcard 
n:Stewart;Mark
tel;cell:319-290-2021
tel;fax:319-266-9385
tel;work:800-728-8326
x-mozilla-html:FALSE
url:www.rspnetwork.com
org:RSPNetwork, Inc.;Development
version:2.1
email;internet:[EMAIL PROTECTED]
title:Vice President
adr;quoted-printable:;;1025 Technology Parkway=0D=0A;Cedar Falls;IA;50613;USA
x-mozilla-cpt:;4256
fn:Mark Stewart
end:vcard



Re: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread Sergey V. Udaltsov

 
 The XML parser should be included in the distro since new and average
 users MAY never use XML in their apps.
OK. My vote is for xerces (it is good and has same licence). 
Also, it would be good to have the list of tomcat-compatible parsers.
At the moment, I tried jaxp 1.1 and latest xerces - they work correct.
What about people using IBM's one? MS's one?

BTW, for new and average users it is possible to use RPM dependancies.
For example, ask xerces (and sun's) people to put their classes to
parser.jar and check for this jar in RPM. Another option, RPM
pre-install script could try to find existing parser (and fail if there
is no one). RPM is rather sophisticated mechanism to deal with this
problem...

Regards,

Sergey



getResourceAsStream doesn't find files in WEB-INF/classes

2001-06-22 Thread Richard Sand

Hi- I've deployed an application with Tomcat at the root (i.e. /).  At one
point I load a resource file with the command:

InputStream is = getClass().getResourceAsStream(/app.properties);

But Tomcat throws an exception here if the file app.properties is in the
/WEB-INF/classes directory.  If I copy it into a directory that is in the
default CLASSPATH, then it works fine.  Isn't the WEB-INF/classes directory
for each deployed application automatically added to the Tomcat classpath?
Is the behavior I'm seeing the expected behavior?

I hope I'm just doing something thick... otherwise, its more problematic to
be able to bundle up an application, because the resource files would need
to be copied somewhere else.  Any advice?

BTW Tomcat 3.2.2 on Win2k, no web server (i.e. Tomcat default, port 8080).

Thanks!

-Richard




RE: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread GOMEZ Henri


 The XML parser should be included in the distro since new and average
 users MAY never use XML in their apps.
OK. My vote is for xerces (it is good and has same licence).
Also, it would be good to have the list of tomcat-compatible parsers.
At the moment, I tried jaxp 1.1 and latest xerces - they work correct.
What about people using IBM's one? MS's one?

IBM xml4j is at 99% xerces-j
Did MS got a jav parser ?

BTW, for new and average users it is possible to use RPM
dependancies.

I started think at this that's why my latest xerces-j RPM have a :

Provides jaxp 1.1

May be next release

For example, ask xerces (and sun's) people to put their classes to
parser.jar and check for this jar in RPM. Another option, RPM
pre-install script could try to find existing parser (and fail if there
is no one). RPM is rather sophisticated mechanism to deal with this
problem...

The build process of RPM allready deal with installed parser (jaxp
1.0/xerces-j)
may be next time crimson. I could add such system at install time but what 
to do when a user got at the same time, crimson and xerces-j ???

Regards,

Sergey
 



Re: distributable servlet in Tomcat3.2

2001-06-22 Thread Xavier Marjou

Hello,

Sorry for the first mail I sent. I realize now that I
completly misunderstood what distributable is.
I realized it thanks to this link:
http://www.oreilly.com/catalog/jservlet2/chapter/ch12.html

And then better understood the Servlet Spec and these
2 links:
http://marc.theaimsgroup.com/?l=tomcat-userm=97847365703731w=2
http://marc.theaimsgroup.com/?l=tomcat-userm=86951988715446w=2

Xavier

--- Xavier Marjou [EMAIL PROTECTED] wrote:
 Hello,
 
 I've read on this list that Tomcat 3.2 supports
 serializing sessions attributes. I wanted to try it,
 but could not find more information on the subject
 here. So I tried to do it according to the servlet
 2.2
 specification. As it is not working, I try to sum-up
 here what I've done:
 
 I have installed 2 Tomcat 3.2 on the same machine
 (taking care that the 2nd Tomcat starts on port
 8081),
 and for each of them, I have built a very simple
 session webapp :
 - session/
   - WEB-APP/
 web.xml
 - classes/
   SessionServlet.class
 
 The web.xml looks like:
 ?xml version=1.0 encoding=ISO-8859-1?
 !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
   distributable
   /distributable
 servlet
 servlet-namesession/servlet-name

 servlet-classSessionServlet/servlet-class
 /servlet
 servlet-mapping
 servlet-namesession/servlet-name
 url-pattern/session/url-pattern
 /servlet-mapping
 /web-app
 
 
 For the firt Tomcat, I compiled:
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 public class SessionServlet extends HttpServlet {
 public void doGet (HttpServletRequest req,
 HttpServletResponse res)
   throws ServletException, IOException
   {
 ServletOutputStream out = res.getOutputStream();
 res.setContentType(text/plain);
 out.println(SessionServlet 1 output);
 
 ServletContext servletContext =
 this.getServletContext();
 servletContext.setAttribute(foo,abcdef..foo);
 out.println(attribute foo, with value
 abcde...foo, added in ServletContext);
 
 HttpSession httpSession = req.getSession();
 httpSession.setAttribute(bar,abcde...bar);
 out.println(attribute bar, with value
 abcde...bar, added in HttpSession);
 
 out.close();
   }
 }
 
 For the second Tomcat, I compiled:
 import java.io.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 public class SessionServlet extends HttpServlet {
 public void doGet (HttpServletRequest req,
 HttpServletResponse res)
   throws ServletException, IOException
   {
 ServletOutputStream out = res.getOutputStream();
 
 res.setContentType(text/plain);
 out.println(SessionServlet 2 Output);
 
 ServletContext servletContext =
 this.getServletContext();
 String foo = (String)
 servletContext.getAttribute(foo);
 out.println(foo=+ foo + (get from
 ServletContext));
 
 HttpSession httpSession = req.getSession();
 String bar = (String)
 httpSession.getAttribute(bar);
 out.println(bar=+ bar + (get from
 HttpSession));
 
 out.close();
   }
 }
 
 Requesting respectively the first servlet, and the
 second serlvet did not give the expected results:
 
 http://127.0.0.1:8080/session/servlet/SessionServlet
 SessionServlet 1 output 
 attribute foo, with value abcde...foo, added in
 ServletContext 
 attribute bar, with value abcde...bar, added in
 ServletContext
 
 http://127.0.0.1:8081/session/servlet/SessionServlet
 SessionServlet 2 Output 
 foo=null (get from ServletContext) 
 bar=null (get from HttpSession) 
 
 
 So did I made a mistake, did I forget something, or
 is
 it simply not possible to do it ? 
 Thanks for any help !
 
 Xavier Marjou
 
 __
 Do You Yahoo!?
 Spot the hottest trends in music, movies, and more.
 http://buzz.yahoo.com/


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



mod_jk.so for LINUX

2001-06-22 Thread Pier Paolo Bortone



Hi,
is there someone that knows why exists two files 
mod_jk.so (-eapi and -noeapi) for LINUX?

Which do I have to use? Do I have to cut the word 
after '.so'?

Thanks.

Pier Paolo.


RE: mod_jk.so for LINUX

2001-06-22 Thread GOMEZ Henri

is there someone that knows why exists two files mod_jk.so (-eapi and
-noeapi) for LINUX? 

I'm updating the mod_jk doc on TC 3.2/3.3/J-T-C


Which do I have to use? Do I have to cut the word after '.so'?

If you have an Apache with EAPI (ie mod_ssl) use mod_jk.so-eapi
and rename to mod_jk.so 




Re: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread Sergey V. Udaltsov

GOMEZ Henri wrote:
 IBM xml4j is at 99% xerces-j
 Did MS got a jav parser ?
I do not know whether it is JAXP-compatible and native but some MS XML
parser does exist...
 
 I started think at this that's why my latest xerces-j RPM have a :
 
 Provides jaxp 1.1
Great! This is a way!

 May be next release
OK 

 may be next time crimson. I could add such system at install time but what
 to do when a user got at the same time, crimson and xerces-j ???
Can two installed RPMs provide jaxp 1.1? Is this valid in RPM world?

If yes, some post-install script should ask user to choose the parser
somehow...
Is this possible with RPM technology?

Cheers,

Sergey



Re: mod_jk.so for LINUX

2001-06-22 Thread Pier Paolo Bortone

Gomez,
I have found docs about the argument on TC 3.3 but not on 3.2.

BTW thanks now I have understood.

Pier Paolo.

- Original Message - 
From: GOMEZ Henri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 3:02 PM
Subject: RE: mod_jk.so for LINUX


 is there someone that knows why exists two files mod_jk.so (-eapi and
 -noeapi) for LINUX? 
 
 I'm updating the mod_jk doc on TC 3.2/3.3/J-T-C
 
 
 Which do I have to use? Do I have to cut the word after '.so'?
 
 If you have an Apache with EAPI (ie mod_ssl) use mod_jk.so-eapi
 and rename to mod_jk.so




Tomcat not putting session objects into JSP page context?

2001-06-22 Thread Richard Sand



Hi all- I've got a JSP/Javabean application that 
works fine under JRun and iPlanet Web Server. However, when I use Tomcat, 
it does not seem to be instantiating new session variables if they don't already 
exist. In the top of my JSP page, I have:

jsp:useBean id="loginBean" class="LoginBean" 
scope="session"/

And further down in the page I do (actually inside 
a TagLib, but I tried it in the page as well as a test):

 Object obj = 
pageContext.getAttribute("loginBean");

But obj comes back as null. If 
Itry:

LoginBean tlb = (LoginBean) 
session.getAttribute("loginBean");

then I get the bean! Why is my call to 
pageContext failing to get loginBean, especially considering that this works on 
other Java application servers?

Thanks for any help!

Best regards,

Richard



JkMount in httpd.conf

2001-06-22 Thread Richard Richter

Hello...

I'm using Apache with mod_jk and Tomcat for jsps and servlets. JSP is without 
problem, but servlet don't want to run. Because informations about absolute path 
of requested document is written to terminal, where Tomcat was started, I found 
out that servlet (URI: 
http://poseidon.bgs.sk:/intranet/WEB-INF/classes/Hello) is not translated 
from relative to absolute path - nothing apears on terminal.

I think, that Apache don't redirect this request to Tomcat (or appropriate 
worker)... my httpd.conf has this section:

VirtualHost poseidon.bgs.sk:
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /export/home/virgo/web-data
Location /export/home/virgo/web-data
Options Indexes FollowSymLinks
AllowOverride None
SetHandler default-handler
Order allow,deny
Allow from all
/Location
ServerName poseidon.bgs.sk
JkMount /*.jsp virgo
JkMount /intranet/* virgo
ErrorLog /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/error_log
TransferLog /opt/oracle/ias/product/8.1.7/Apache/Apache/logs/access_
log
/VirtualHost

*.jsp works good, but second JkMount not... I tried many versions of second 
field of that line - but nothing. Always 404 Forbidden (Apache signed on the 
bottom of page ;-))... How I have to force Apache to redirect requests for 
servlets (eg. for URI specified upper) to Tomcat (or worker called virgo in my 
case)???

Thanks for any suggestion

Richard Richter ([EMAIL PROTECTED])
Application Programmer, Business Global Systems a. s.




Re: how does index.html come up?

2001-06-22 Thread Thomas Cherry

I have the same question, but I want to reproduce the action.  Say I 
have a servlet at pathtotomcat/WebApps/myServlet and I can access that 
servlet with http://localhost:8080/myServlet?.  What do I have to do so 
that I can access http://localhost:8080/mySelvlet/login.html and not 
have the server run?


On Thursday, June 21, 2001, at 05:55  PM, alex chang wrote:

 I just recently downloaded the tomcat 3.3m3 zip
 to my Windows 2000 desktop.

 When I go to http://localhost:8080, how does it
 know to go to the index.html file in my
 wepapps/ROOT directory? (I'm assuming this *is*
 where it's going?)

 In my server.xml file, I don't see a Context
 tag like I've been reading about. But near the
 end of that file it says something about how
 ContectXmlReader reads all the context definitions.

 Near the top I do see:
 ContectXmlReader config=conf/apps.xml

 But in that conf directory I don't see an
 apps.xml. However I do see:

 apps-127.0.0.1.xml
 apps-admin.xml
 apps-examples.xml

 Is the apps-127.0.0.1.xml being read somehow?
 Can someone explain the process of what happens
 from the time you enter localhost:8080 in your
 browser, to how the page gets served up?

 Thanks!
 -alex

 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo! Mail
 http://personal.mail.yahoo.com/

--
Don't give in to hate- that leads to the dark side. -Obi-Wan, Jedi Knight



Re: getResourceAsStream doesn't find files in WEB-INF/classes

2001-06-22 Thread lists


Try removing the beginning /. ie getClass().getResourceAsStream(app.properties);

Christopher Lambrou,
CGL Computer Services, Inc.
Empire State Building, 
PMB 16J Suite 3304 
New York, NY 10118
Tel: (212) 971-9723
Fax: (212) 564-1135
URL: http://www.cglcomputer.com
Email: [EMAIL PROTECTED]

On 6/22/2001 14:37:38, you said:
Hi- I've deployed an application with Tomcat at the root (i.e. /).  At one
point I load a resource file with the command:

InputStream is = getClass().getResourceAsStream(/app.properties);

But Tomcat throws an exception here if the file app.properties is in the
/WEB-INF/classes directory.  If I copy it into a directory that is in the
default CLASSPATH, then it works fine.  Isn't the WEB-INF/classes directory
for each deployed application automatically added to the Tomcat classpath?
Is the behavior I'm seeing the expected behavior?

I hope I'm just doing something thick... otherwise, its more problematic to
be able to bundle up an application, because the resource files would need
to be copied somewhere else.  Any advice?

BTW Tomcat 3.2.2 on Win2k, no web server (i.e. Tomcat default, port 8080).

Thanks!

-Richard






mod_jk problems - take a look at

2001-06-22 Thread GOMEZ Henri

http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg09075.html




RE: [POLL] Tomcat 3.x RPMS : Which XML Parser to be put in ? : WAS : XML parser: old version

2001-06-22 Thread GOMEZ Henri

I do not know whether it is JAXP-compatible and native but some MS XML
parser does exist...

I'm not sure we will ever saw a MS XML parser on Linux and
may never a MS Java XML Parser 

 I started think at this that's why my latest xerces-j RPM have a :

 Provides jaxp 1.1
Great! This is a way!

 May be next release
OK

 may be next time crimson. I could add such system at install
time but what
 to do when a user got at the same time, crimson and xerces-j ???
Can two installed RPMs provide jaxp 1.1? Is this valid in RPM world?

If yes, some post-install script should ask user to choose the parser
somehow...

With the RPM exclusive, you just could have at the
Is this possible with RPM technology?

No, they are not exclusive...  (but I not sure at 100%)



RE: getResourceAsStream doesn't find files in WEB-INF/classes

2001-06-22 Thread Randy Layman


The question is - what class loader loaded the class this is being
called from?  The getClass().getResourceAsStream doesn't magically know
about resources that are not loaded with its own classloader or one of its
parents.  So, app.properties and the class that you are trying to load this
from must be loaded from the same classloader, which means that they both
must either be in the CLASSPATH, or the %TOMCAT_HOME/{lib|classes}, or
WEB-INF/{lib/classes}.  If the class is higher up in the classpath then it
won't be able to find the properties file.

Randy

 -Original Message-
 From: Richard Sand [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 8:38 AM
 To: [EMAIL PROTECTED]
 Subject: getResourceAsStream doesn't find files in WEB-INF/classes
 
 
 Hi- I've deployed an application with Tomcat at the root 
 (i.e. /).  At one
 point I load a resource file with the command:
 
 InputStream is = getClass().getResourceAsStream(/app.properties);
 
 But Tomcat throws an exception here if the file 
 app.properties is in the
 /WEB-INF/classes directory.  If I copy it into a directory 
 that is in the
 default CLASSPATH, then it works fine.  Isn't the 
 WEB-INF/classes directory
 for each deployed application automatically added to the 
 Tomcat classpath?
 Is the behavior I'm seeing the expected behavior?
 
 I hope I'm just doing something thick... otherwise, its more 
 problematic to
 be able to bundle up an application, because the resource 
 files would need
 to be copied somewhere else.  Any advice?
 
 BTW Tomcat 3.2.2 on Win2k, no web server (i.e. Tomcat 
 default, port 8080).
 
 Thanks!
 
 -Richard
 



Re: TagLib Class Resolution Problem (TomCat 3.2.1)

2001-06-22 Thread Philip Weaver

I figured this out. I could not access my taglib from different
sub-directories because my taglib was not in a package.

Philip

on 6/22/01 3:30 AM, Philip Weaver at [EMAIL PROTECTED] wrote:

 
 Whenever I use my taglib from within the subdirectory pages, for example,
 jasper complains that Class pages.SpecialConnectionTag not found in type
 declaration. So, it appears to find the taglib but thinks that it's part of
 a package? (which it's not)
 
 I can work around this by keeping everything in one directory but how do I
 solve this? I don't have the problem using the same pages in Resin so this
 could be a configuration problem with Tomcat. Please help.
 
 Thanks,
 Philip
 




User IP Address

2001-06-22 Thread Mark Muffett



Anyone know if it's possible to use JSP / Tomcat to 
get user IP addresses (for logging)? - or any other user info that might go to 
the server (like referrer)?

Ideas and sample code would be very 
welcome...

Thanks

Mark


Re: User IP Address

2001-06-22 Thread Bo Xu

Mark Muffett wrote:

 Anyone know if it's possible to use JSP / Tomcat to get user IP
 addresses (for logging)? - or any other user info that might go to the
 server (like referrer)? Ideas and sample code would be very
 welcome... Thanks Mark

Hi :-)  I suggest you try:

- javax.servlet.ServletRequest.getRemoteAddr()
- javax.servlet.ServletRequest.getRemoteHost()

but sometimes they don't work, for example:
- there is a HTTP-proxy between client and Servlet
- client is behind firewall
- ...

Bo
June 22, 2001






RE: User IP Address

2001-06-22 Thread Randy Layman


request.getRemoteAddr() will get the user's IP Address
requet.getRemoteHost() will do DNS lookup on the address

request.getHeader(Referrer) is the referrer, I believe.

Randy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 10:55 AM
To: [EMAIL PROTECTED]
Subject: RE: User IP Address


Should be able to query the HTTPServletRequest object to get this
information, try looking there
-Original Message-
From: Mark Muffett [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 9:50 AM
To: [EMAIL PROTECTED]
Subject: User IP Address


Anyone know if it's possible to use JSP / Tomcat to get user IP addresses
(for logging)? - or any other user info that might go to the server (like
referrer)?
 
Ideas and sample code would be very welcome...
 
Thanks
 
Mark



RE: User IP Address

2001-06-22 Thread SHeyns



Should be able to 
query the HTTPServletRequest object to get this information, try looking 
there

  -Original Message-From: Mark Muffett 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, June 22, 2001 9:50 
  AMTo: [EMAIL PROTECTED]Subject: User IP 
  Address
  Anyone know if it's possible to use JSP / Tomcat 
  to get user IP addresses (for logging)? - or any other user info that might go 
  to the server (like referrer)?
  
  Ideas and sample code would be very 
  welcome...
  
  Thanks
  
  Mark


Re: User IP Address

2001-06-22 Thread Corey A. Johnson

one thing to note that i discovered the hard way.. referrer should be spelled
as so:

request.getHeader(referer)

not sure why... but i beat my head against the wall for an hour... until i
tried the alternate spelling...

Cj



Randy Layman wrote:

 request.getRemoteAddr() will get the user's IP Address
 requet.getRemoteHost() will do DNS lookup on the address

 request.getHeader(Referrer) is the referrer, I believe.

 Randy

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 10:55 AM
 To: [EMAIL PROTECTED]
 Subject: RE: User IP Address

 Should be able to query the HTTPServletRequest object to get this
 information, try looking there
 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: User IP Address

 Anyone know if it's possible to use JSP / Tomcat to get user IP addresses
 (for logging)? - or any other user info that might go to the server (like
 referrer)?

 Ideas and sample code would be very welcome...

 Thanks

 Mark

--
Corey A. Johnson
Creative Network Innovations
http://www.cniweb.net/
1-800-CNi-5547 ** 1-321-259-1984





Re: User IP Address

2001-06-22 Thread Mark Muffett

Brilliant! works perfectly.  Now to write the logging program...

Thanks

Mark

- Original Message - 
From: Randy Layman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 22, 2001 3:23 PM
Subject: RE: User IP Address


 
 request.getRemoteAddr() will get the user's IP Address
 requet.getRemoteHost() will do DNS lookup on the address
 
 request.getHeader(Referrer) is the referrer, I believe.
 
 Randy
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 10:55 AM
 To: [EMAIL PROTECTED]
 Subject: RE: User IP Address
 
 
 Should be able to query the HTTPServletRequest object to get this
 information, try looking there
 -Original Message-
 From: Mark Muffett [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 9:50 AM
 To: [EMAIL PROTECTED]
 Subject: User IP Address
 
 
 Anyone know if it's possible to use JSP / Tomcat to get user IP addresses
 (for logging)? - or any other user info that might go to the server (like
 referrer)?
  
 Ideas and sample code would be very welcome...
  
 Thanks
  
 Mark
 




RE: User IP Address

2001-06-22 Thread Michael Wentzel

 Brilliant! works perfectly.  Now to write the logging program...

You might want to check out Randy's request logging interceptor
see attachment...

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



attch:

Since a number of people have asked for it over the past and I had a
little extra time, I wrote a RequestInterceptor that logs requests.

Its still a little rough and have room for some performance
improvements, but I believe that it is functional.  You can view the
documentation and download it from:

http://www.aswethink.com/employees/randy/tomcat/requestLogger.html

If you have any feedback, please send it directly to me so that we
don't clutter up the list.



Re: apache tomcat as services under Linux

2001-06-22 Thread Pier Paolo Bortone

OK,
I have created 2 different scripts, one for apache and one for tomcat. These
scripts works fine if I call them manualli: ./S97apache start or ./S96tomcat
start or ./K15
But if I restart Linux, when it is up both the tomcat and apache processes
are not up.
I have tried to examine the /var/log/boot.log but I don't found nothing
about.

Why??
:-(((
Pier Paolo.
- Original Message -
From: Antoni Reus [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 20, 2001 4:47 PM
Subject: Re: apache  tomcat as services under Linux


 Hi,

 You should create a script with something like
 and put it on  /etc/rc.d/init.d/

  cut here---
 #!/bin/sh

 # Set this as you have it in your sistem
 APACHE_HOME=/usr/local/apache
 TOMCAT_HOME=/usr/local/jakarta/tomcat

 # Test apachectl
 if [ ! -x $APACHE_HOME/bin/apachectl ]
 then
 echo apachectl not found
 exit
 fi

 # Test tomcat.sh
 if [ ! -x $TOMCAT_HOME/bin/tomcat.sh ]
 then
echo tomcat not found
exit
 fi

 case $1 in
 start)
 ## Start services
 $APACHE_HOME/bin/apachectl start
 $TOMCAT_HOME/bin/startup.sh
 ;;
 stop)
 $TOMCAT_HOME/bin/shutdown.sh
 $APACHE_HOME/bin/apachectl stop
 ;;
 esac
 -cut here --

 name it apache-tomcat and give it execution permissions
 with
 chmod u+x  apache-tomcat

 Then with control-panel you can link it to the run-level 3
 or you can make it directly with

 # Start in run level 3
 cd /etc/rc.d/rc3.d
 ln -s ../init.d/apache-tomcat S99apache-tomcat

 # Stop
 cd ../rc0.d
 ln -s ../init.d/apache-tomcat K11apache-tomcat


 Saludos,

 -- Antoni Reus

 - Original Message -
 From: Pier Paolo Bortone [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 20, 2001 2:15 PM
 Subject: apache  tomcat as services under Linux


 Hi,
 I need to start to use apache   tomcat in a production environment, thus
I
 need to start them as services.

 I'm using RedHat 7.1, someone knows which scripts I have to put in rc3.d.

 Thanks for your time.

 Pier Paolo.





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

2001-06-22 Thread chris brown

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

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

Compiling with: -encoding UTF8 ...

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

This has some unfortunate side effects:

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

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

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

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

-Chris




RE: User IP Address

2001-06-22 Thread Randy Layman


Does the case matter here, or just dropping the r?

Randy

 -Original Message-
 From: Corey A. Johnson [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 22, 2001 11:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: User IP Address
 
 
 one thing to note that i discovered the hard way.. referrer 
 should be spelled
 as so:
 
 request.getHeader(referer)
 
 not sure why... but i beat my head against the wall for an 
 hour... until i
 tried the alternate spelling...
 
 Cj
 
 
 
 Randy Layman wrote:
 
  request.getRemoteAddr() will get the user's IP Address
  requet.getRemoteHost() will do DNS lookup on the address
 
  request.getHeader(Referrer) is the referrer, I believe.
 
  Randy
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2001 10:55 AM
  To: [EMAIL PROTECTED]
  Subject: RE: User IP Address
 
  Should be able to query the HTTPServletRequest object to get this
  information, try looking there
  -Original Message-
  From: Mark Muffett [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2001 9:50 AM
  To: [EMAIL PROTECTED]
  Subject: User IP Address
 
  Anyone know if it's possible to use JSP / Tomcat to get 
 user IP addresses
  (for logging)? - or any other user info that might go to 
 the server (like
  referrer)?
 
  Ideas and sample code would be very welcome...
 
  Thanks
 
  Mark
 
 --
 Corey A. Johnson
 Creative Network Innovations
 http://www.cniweb.net/
 1-800-CNi-5547 ** 1-321-259-1984
 
 



Re: mysteriously dying connections (Oracle - tomcat)

2001-06-22 Thread Boris Niyazov

Make sure your developers properly close resultsets and statements. It could be 
that they remain open after exceptions. Make sure you have the closing 
statements in the finally section of try/catch/finally.

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 all!

problem:


database access is managed via a java class that is
instantiated and loaded into each clients session. every
PL/SQL function and/or SQL statement a client needs is
called in a method of this class.
first, a connection is opened, the statement is called,
all resultsets and statements are closed and finally the
connection is closed. (or returned back to the
connection pool if one is used)

the driver we use is the Oracle jdbc ThinDriver (jdbc
driver type 4). after running the system for several
days, dead connections (and as we just discovered, tons
of open cursors) pile up.
eventually the webserver(tomcat) will crash or just
hang.
in the process, access gets slower and slower, there may
be delays of 3 minutes until the webserver (or, perhaps
the database, in which case the webserver would be just
waiting for the db..) gives a response.
after a restart of the webserver or the database or
both, the system runns very well again.

we tried several connection pools. with these, there
were no delays for getting a connection, but the pool
threw timeoutExceptions (i.e. made it visible that there
are hanging connections) and after a few hundred
timeouts the VM crashed with a stack overflow.

the connections seem to get killed/kill themselfes
randomly no matter which function was called. we log the
methods and statements that were called for the
connections that die, but there is just no pattern in
it. thats why we dont find the root of the problem.. is
it the driver ? the database ? the tomcat ?



environment:


Web Server:
Suse Linux 7.2
Apache Webserver /w Tomcat JSP Engine 3.2 /w SSL

DB Server:
Suse Linux 7.2
Oracle 8i 8.1.7 /w multi-threaded server (MTS)

Backup Server:
Oracle Shadow server



things done:


- linux update
- apache update
- tomcat update
- jdbc thin driver update
(everywhere the newest version)
- tried several connection pools



possible changes:
-

- use OCI drivers instead of thin driver
- use J-serv with GNU_jsp instead of tomcat




every help is welcome, we're frustrated to no ends.
thanks very much in advance!!

l.sägesser


  - Boris





Re: User IP Address

2001-06-22 Thread Corey A. Johnson

case matters as well i believe..

Cj

Randy Layman wrote:

 Does the case matter here, or just dropping the r?

 Randy

  -Original Message-
  From: Corey A. Johnson [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 22, 2001 11:58 AM
  To: [EMAIL PROTECTED]
  Subject: Re: User IP Address
 
 
  one thing to note that i discovered the hard way.. referrer
  should be spelled
  as so:
 
  request.getHeader(referer)
 
  not sure why... but i beat my head against the wall for an
  hour... until i
  tried the alternate spelling...
 
  Cj
 
 
 
  Randy Layman wrote:
 
   request.getRemoteAddr() will get the user's IP Address
   requet.getRemoteHost() will do DNS lookup on the address
  
   request.getHeader(Referrer) is the referrer, I believe.
  
   Randy
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 22, 2001 10:55 AM
   To: [EMAIL PROTECTED]
   Subject: RE: User IP Address
  
   Should be able to query the HTTPServletRequest object to get this
   information, try looking there
   -Original Message-
   From: Mark Muffett [mailto:[EMAIL PROTECTED]]
   Sent: Friday, June 22, 2001 9:50 AM
   To: [EMAIL PROTECTED]
   Subject: User IP Address
  
   Anyone know if it's possible to use JSP / Tomcat to get
  user IP addresses
   (for logging)? - or any other user info that might go to
  the server (like
   referrer)?
  
   Ideas and sample code would be very welcome...
  
   Thanks
  
   Mark
 
  --
  Corey A. Johnson
  Creative Network Innovations
  http://www.cniweb.net/
  1-800-CNi-5547 ** 1-321-259-1984
 
 

--
Corey A. Johnson
Creative Network Innovations
http://www.cniweb.net/
1-800-CNi-5547 ** 1-321-259-1984





Problems using Jikes as compiler

2001-06-22 Thread chris brown

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

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

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

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

Thanks,
-Chris








problems runing jsp examples which come with Tomcat3.2.2

2001-06-22 Thread Ali Rahmanzadeh

Dear all,
I have installed Tomcat3.2.2 on a Solaris 8 system with jdk1.3.
I can run all the servlet examples, but I get java.lang.NoSuchMethodError
exception when I try to run any of the jsp examples. The followings is what 
I get when I try to run 'date.jsp'. I would appreciate any suggestions that 
you may have.


When I start Tomcat it tells me that the class path is:

Using classpath: 
/usr/local/jakarta-tomcat-3.2.2/lib/ant.jar:/usr/local/jakarta-tomcat-3.2.2/lib/jasper.jar:/usr/local/jakarta-tomcat-3.2.2/lib/
jaxp.jar:/usr/local/jakarta-tomcat-3.2.2/lib/parser.jar:/usr/local/jakarta-tomcat-3.2.2/lib/servlet.jar:/usr/local/jakarta-tomc
at-3.2.2/lib/test:/usr/local/jakarta-tomcat-3.2.2/lib/webserver.jar:/usr/local/jdk1.3/lib/tools.jar:/usr/local/jdk1.3

All the paths are valid.



The exception I get when trying to run date.jsp:

2001-06-22 05:39:40 - Ctx( /examples ): JasperException: R( /examples + 
/jsp/dates/date.jsp + null) Cannot read file: 
/jsp/dates/date.jsp
2001-06-22 05:39:40 - Ctx( /examples ): Exception in: R( /examples + 
/jsp/dates/date.jsp + null) - java.lang.NoSuchMethodError
at 
org.apache.tomcat.context.ExceptionHandler.doService(DefaultCMSetter.java:289)
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.handleError(ContextManager.java:1160)
at org.apache.tomcat.core.Handler.service(Handler.java:312)
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:479)

---
The corresponding messages in the jasper.log  is:


2001-06-22 05:39:40 - JspEngine -- /jsp/dates/date.jsp
2001-06-22 05:39:40 -ServletPath: /jsp/dates/date.jsp
2001-06-22 05:39:40 -   PathInfo: null
2001-06-22 05:39:40 -   RealPath: 
/usr/local/jakarta-tomcat-3.2.2/webapps/examples/jsp/dates/date.jsp
2001-06-22 05:39:40 - RequestURI: /examples/jsp/dates/date.jsp
2001-06-22 05:39:40 -QueryString: null
2001-06-22 05:39:40 - Request Params:
2001-06-22 05:39:40 - Classpath according to the Servlet Engine is: 
/usr/local/jakarta-tomcat-3.2.2/webapps/examples/WEB-INF
/classes
2001-06-22 05:39:40 - JspReader: Exception parsing file /jsp/dates/date.jsp - 
java.lang.NoSuchMethodError
at 
org.apache.jasper.JspEngineContext.getResourceAsStream(JspEngineContext.java:348)
at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:211)
at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java:164)
at org.apache.jasper.compiler.JspReader.init(JspReader.java:282)
at org.apache.jasper.compiler.JspReader.createJspReader(JspReader.java:288)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:159)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
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:588)
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:479)

-

Thanks 
Ali




Help! strange bahavior when opening url with JSESSIONID explicitly set

2001-06-22 Thread Bari, Naeem


Hi all,

My environment:
Solaris 8
Tomcat 3.2.2
jdk1.2

I have a need to open URLs on tomcat from within my code.
I have done this successfully with JServ, no problem
To do this with Tomcat, I just changed the cookie
to JSESSIONID.

After setting the cookie and posting the post data, I
call URLConnection.getInputStream(). At this point 2 things
happen:

 - The method call never returns
 - Tomcat spins out of control, refusing to answer any requests

Any suggestions would be *much* appreciated, I am banging
my head against the wall right now.

I have tried to encode the session id as ;jsessionid=sessionid
on the URL string to see if GET would work where POST was not -
no difference.

Thanks,
naeem



What I shall look for the cause for ContextManager: Error

2001-06-22 Thread Vernon Wu
I run an application on Tomcat 3.x. I get an error message: "ContextManager: Error reading request, ignored - java.lang.ArrayIndexOutOfBoundsException" in one JSP page. I have looked at the page and can't see anything wrong. What I shall look for the cause? Ithappens when I submit a form.

v.Get your FREE download of MSN Explorer at http://explorer.msn.com


session timeout handling

2001-06-22 Thread mwhitman

When a Tomcat session times out does it send you to a preset error page?
What is the mechanism there?
What is the best way to handle timed out users? 




RE: session timeout handling

2001-06-22 Thread Michael Wentzel

 When a Tomcat session times out does it send you to a preset 
 error page?

No. not unless you throw an exception due to dependence on something
from session.  You could develop an entire webapp without ever using
the session and despite the fact you never use it it will still be
instantiated.  For obvious reasons.

 What is the mechanism there?

No mechanism!

 What is the best way to handle timed out users? 

Depends.  Do you have a security concern(if so you should be implementing
Realms of some sort which manage the session timeout for you)?  Are you
requiring something to exist in the session for certain portions of your
app? ...  It all depends on what you specs and app requirements state.



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



RE: session timeout handling

2001-06-22 Thread SHeyns
Title: RE: session timeout handling





Timeout will not send anyone anywhere. When the session expires it cleans up all the objects in the session's attributes. If the objects are of type HttpSessionBindingListener then an event is thrown against them. 

The best way to handle timed out users is to attach an object of HttpSessionBindingListener to their session, When that object recieves the unbound event do whatever is needed to be done to clean up.

Note - (I got burned on this) at the unbound event the session object no longer references any attributes (or maybe it is just some) so the object of the above type should have enough intelligence in it to handle the actions you want to perform at the end.

for example you had a session attribute storing the logged in user name, dont expect that attribute to be available after the unbound event. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: session timeout handling



When a Tomcat session times out does it send you to a preset error page?
What is the mechanism there?
What is the best way to handle timed out users? 





Re: session timeout handling

2001-06-22 Thread Bo Xu

[EMAIL PROTECTED] wrote:

 When a Tomcat session times out does it send you to a preset error page?
 What is the mechanism there?
 What is the best way to handle timed out users?

Hi :-)  I suggest you make a object witch implements
javax.servlet.http.HttpSessionBindingListener, and put object into a session

by setAttibute(...), then:
- when that object is bounded into session, valueBound(...) will be
called
   by container

- when the session is timeout/inValidate(...),   that object will be
unbounded,
  then valueUnbound(...) will be called by container


the following is a sample code from Servlet-List:

class CleanUp implements HttpSessionBindingListener{
   private String name;

   public CleanUp(String name){
  this.name = name;
   }

   public void valueBound(HttpSessionBindingEvent evt){
  System.out.println(in CleanUp, valueBound..., name=+name);
   }

   public void valueUnbound(HttpSessionBindingEvent evt){
  System.out.println(in CleanUp, valueUnBound..., name=+name);
   }
}


in MyServlet:
...
session.setAttribute( Cleaner, new CleanUp(...) );
...

*
- if CleanUp.class is in WEB-INF/classes or in a jar file in WEB-INF/lib,
   it will be loaded by WebappClassloader
- if CleanUp.class is in TOMCAT_HOME/classes or in a jar file in
   TOMCAT_HOME/lib, it will be loaded by SharedClassloader



Bo
June 22, 2001





Help! Novice to Tomcat

2001-06-22 Thread Ganga

Hello all

I am unable to startup Tomcat3.2.2. Any help to resolve my problem is much
appreciated.

I have downloaded jakarta-tomcat-3.2.2zip and I have extracted the file
under c:\tomcat directory.

I have also added the following in tomcat.bat

set TOMCAT_HOME=c:\tomct
set JAVA_HOME=c:\jdk1.3.0_02;%path%

My PC is Windows ME and following is error message:

C:\tomcat\binstartup
Out of environment space
Including all jars in c:\tomcat\lib in your CLASSPATH.
Out of environment space

Using CLASSPATH: c:\tomcat\classes

Out of environment space
Starting Tomcat in new window
Cannot find file
'c:\jdk1.3.0_02;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS\SMITH
\PPLUSO~1\\bin\java'
(or one of its components). Check to ensure the path and filename
are correct and that all required libraries are available.

Many thanks for your time and assistance.

Regards








RE: Help! Novice to Tomcat

2001-06-22 Thread Jann VanOver

Take the %path% off of your JAVA_HOME

Then, if you're still getting this meesage, you must be on win95/98.  Check
out this newsgroup archives for running tomcat on win98 for the answer.

-Original Message-
From: Ganga [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 2:23 PM
To: [EMAIL PROTECTED]
Subject: Help! Novice to Tomcat


Hello all

I am unable to startup Tomcat3.2.2. Any help to resolve my problem is much
appreciated.

I have downloaded jakarta-tomcat-3.2.2zip and I have extracted the file
under c:\tomcat directory.

I have also added the following in tomcat.bat

set TOMCAT_HOME=c:\tomct
set JAVA_HOME=c:\jdk1.3.0_02;%path%

My PC is Windows ME and following is error message:

C:\tomcat\binstartup
Out of environment space
Including all jars in c:\tomcat\lib in your CLASSPATH.
Out of environment space

Using CLASSPATH: c:\tomcat\classes

Out of environment space
Starting Tomcat in new window
Cannot find file
'c:\jdk1.3.0_02;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS\SMITH
\PPLUSO~1\\bin\java'
(or one of its components). Check to ensure the path and filename
are correct and that all required libraries are available.

Many thanks for your time and assistance.

Regards







RE: session timeout handling

2001-06-22 Thread mwhitman

We carry a userid and a shopping cart in the session thu out the app.
If the user goes to lunch and comes back, we would like to give them sort of
friendly error if their session times out.

At 04:19 PM 6/22/2001 -0400, you wrote:
  When a Tomcat session times out does it send you to a preset
  error page?

No. not unless you throw an exception due to dependence on something
from session.  You could develop an entire webapp without ever using
the session and despite the fact you never use it it will still be
instantiated.  For obvious reasons.

  What is the mechanism there?

No mechanism!

  What is the best way to handle timed out users?

Depends.  Do you have a security concern(if so you should be implementing
Realms of some sort which manage the session timeout for you)?  Are you
requiring something to exist in the session for certain portions of your
app? ...  It all depends on what you specs and app requirements state.



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




RE: session timeout handling

2001-06-22 Thread SHeyns
Title: RE: session timeout handling





configure something on the page sent to the client which times out after the length of time that your session objects timeout at  Something like ..

meta http-equiv=Refresh content=lengthOfTimeInSeconds URL=sorryYouTimedOut.html


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 4:18 PM
To: [EMAIL PROTECTED]
Subject: RE: session timeout handling



We carry a userid and a shopping cart in the session thu out the app.
If the user goes to lunch and comes back, we would like to give them sort of
friendly error if their session times out.


At 04:19 PM 6/22/2001 -0400, you wrote:
  When a Tomcat session times out does it send you to a preset
  error page?

No. not unless you throw an exception due to dependence on something
from session. You could develop an entire webapp without ever using
the session and despite the fact you never use it it will still be
instantiated. For obvious reasons.

  What is the mechanism there?

No mechanism!

  What is the best way to handle timed out users?

Depends. Do you have a security concern(if so you should be implementing
Realms of some sort which manage the session timeout for you)? Are you
requiring something to exist in the session for certain portions of your
app? ... It all depends on what you specs and app requirements state.



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





RE: session timeout handling

2001-06-22 Thread Michael Wentzel

 We carry a userid and a shopping cart in the session thu out the app.
 If the user goes to lunch and comes back, we would like to 
 give them sort of
 friendly error if their session times out.

Allowing the garbage collector(unless you are REALLY nitpicky about
knowing that errant Objects are being gc immediately) to manage the
cleaning up of these session objects is probably a best practice in
most cases.  This is why I would suggest a Realm for most cases instead
of a implementation of HttpSessionBindingListener(no reason to reinvent
the wheel/pull out the sledge hammer to swat a fly) but the idea that you
want a friendly error on timeout makes me want to say that a
Listener is probably your best bet.  If you are new to the
Model-View-Control
theory Listeners can be kind of daunting to begin with but I would suggest
picking up a good java book if this is the case.  The problem with 
implementing with Realms in you case is, if you were to use FORM AUTH TYPE,
how to determine whether a user is making their initial login or are in the
timeout scenario.  The idea in the post below regarding the refresh meta tag
is also a possible solution and you could make it even more ingenious and
do something with javascript possibly with timers and configure a timer
for some time n  timeout time that would do something like pop up a warning
stating You will be automatically timed out in x minutes  Since this
is
client side it will not cause a request to the server to reset the timeout.

www.bankofamerica.com does something similar to this for their online
banking
I believe.

Just a couple of possibilities.

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



Re: JDK CLASSPATH vs TOMCAT CLASSPATH

2001-06-22 Thread Dennis Murphy

Hi Again,

No one got back to me but I did learn a few things today:

1. No need to tell the system class path about the WEB-INF area.  All I need
to do is compile from WEB-INF/classes and JDK finds all of my custom
packages.  This is b/c by default . is added to JDK's path.

2. I think I know why TOMCAT can't find my classes. That's b/c I do not have
a /WEB-INF/lib folder.  I think this folder should contain the webapp class
loader among other things.

When I installed TOMCAT 3.2.1 out of the box - the examples webapp did not
have a /WEB-INF/lib folder (unless I accidentally deleted it!).

Question: Where do I download the required files for the /WEB-INF/lib
folder?  Or do I have to build them?

Dennis

Dennis Murphy wrote:

 Hi,

 I'm new to JSP.

 I desire to use the class reloadable=YES feature in TOMCAT so that I
 can develop my JAVA BEANS and quickly test them without restarting
 TOMCAT for every little change.

 I believe that the reloadable feature will not work if I inform the
 system CLASSPATH where my JSP application classes are located.  The
 reason for this is that the once the SYSTEM CLASS LOADER loads my
 classes the TOMCAT CLASSLOADER has no control and is unable to
 unload/reload my classes.

 Okay if I'm right on my understanding of this, then how do you setup a
 development environment.  In order for me to compile my JAVA BEANS using
 JDK javac, I must tell JDK where my classes are located in the SYSTEM
 CLASS PATH ... else it won't be able to pickup my custom packages that
 are part of my application.

 So is this like a trade-off? Compile JAVA BEANS or use the TOMCAT class
 reloading feature - but not both?

 Can someone please shed some light on how one should setup a development
 environment?  I would like to have the ability to compile and then test
 with tomcat configured to reload classes.

 Thank you,
 Dennis




why tomcat doesn't run?

2001-06-22 Thread rino . mail

I have Linux redhat 7.1
I do this command an then I try to see il tomcat runs by browsing with 
netscape 127.0.0.1:8080 but don't run: why?

Thankyou in advance, Rino.

COMMAND:

[rino@localhost rino]$ cd tomkat/
[rino@localhost tomkat]$ cd jakarta-tomcat-3.2.1
[rino@localhost jakarta-tomcat-3.2.1]$ cd bin/
[rino@localhost bin]$ echo TOMCAT_HOME
[1] 2587
 
bash: TOMCAT_HOME: command not found
[1]+  Doneecho
[rino@localhost bin]$ echo $TOMCAT_HOME
/home/rino/tomkat/jakarta-tomcat-3.2.1
[rino@localhost bin]$ echo $JAVA_HOME
/usr/java/jdk1.3.0_02
[rino@localhost bin]$ export CATALINA_HOME=/usr/java/jdk1.3.0_02
[rino@localhost bin]$ ./tomcat.sh start
Using classpath: 
/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/ant.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/jasper.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/jaxp.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/parser.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/servlet.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/test:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/webserver.jar:/usr/java/jdk1.3.0_02/lib/tools.jar
[rino@localhost bin]$



look the ps command:

[rino@localhost rino]$ ps -e
  PID TTY  TIME CMD
1 ?00:00:04 init
2 ?00:00:00 keventd
3 ?00:00:00 kapm-idled
4 ?00:00:00 kswapd
5 ?00:00:00 kreclaimd
6 ?00:00:00 bdflush
7 ?00:00:00 kupdated
8 ?00:00:00 mdrecoveryd
   67 ?00:00:00 khubd
  540 ?00:00:00 syslogd
  545 ?00:00:00 klogd
  559 ?00:00:00 portmap
  574 ?00:00:00 rpc.statd
  668 ?00:00:00 apmd
  717 ?00:00:00 automount
  729 ?00:00:00 atd
  744 ?00:00:01 sshd
  764 ?00:00:00 xinetd
  793 ?00:00:00 lpd
  827 ?00:00:00 sendmail
  840 ?00:00:00 gpm
  852 ?00:00:00 crond
  970 ?00:00:11 xfs
 1007 tty1 00:00:00 mingetty
 1008 tty2 00:00:00 mingetty
 1009 tty3 00:00:00 mingetty
 1010 tty4 00:00:00 mingetty
 1011 tty5 00:00:00 mingetty
 1012 tty6 00:00:00 mingetty
 1013 ?00:00:00 gdm
 1014 ?00:00:00 forge_server
 1021 ?00:00:18 X
 1022 ?00:00:00 gdm
 1033 ?00:00:00 ksmserver
 1141 ?00:00:00 kdeinit
 1143 ?00:00:00 kdeinit
 1145 ?00:00:00 kdeinit
 1148 ?00:00:08 artsd
 1151 ?00:00:00 kdeinit
 1165 ?00:00:00 kdeinit
 1167 ?00:00:00 knotify
 1168 ?00:00:01 kdeinit
 1170 ?00:00:01 kdeinit
 1172 ?00:00:03 kdeinit
 1178 ?00:00:40 autorun
 1184 ?00:00:00 kdeinit
 1185 ?00:00:00 kdeinit
 1187 ?00:00:00 kdeinit
 1188 pts/000:00:00 cat
 1222 ?00:00:00 kppp
 1223 ?00:00:00 kppp
 2418 ?00:00:00 java
 2445 ?00:00:00 java defunct
 2446 ?00:00:00 java
 2447 ?00:00:00 java
 2451 ?00:00:00 java
 2478 ?00:00:00 java defunct
 2479 ?00:00:00 java
 2480 ?00:00:00 java
 2490 ?00:00:05 kmail
 2493 ttyS100:00:00 pppd
 2522 ?00:00:00 kdeinit
 2523 pts/300:00:00 bash
 2549 pts/300:00:01 pan
 2551 ?00:00:00 esd
 2552 pts/300:00:00 pan
 2553 pts/300:00:00 pan
 2558 ?00:00:00 kdeinit
 2561 pts/400:00:00 bash
 2590 pts/400:00:00 java
 2617 pts/400:00:00 java defunct
 2618 pts/400:00:00 java
 2619 pts/400:00:00 java
 2621 pts/500:00:00 bash
 2647 pts/500:00:02 netscape-commun
 2682 pts/500:00:00 netscape-commun
 2684 pts/500:00:00 ps
[rino@localhost rino]$




RE: why tomcat doesn't run?

2001-06-22 Thread GOMEZ Henri

Please make us a favor, try our RPM.

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

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



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 23, 2001 12:46 AM
To: '[EMAIL PROTECTED]'
Subject: why tomcat doesn't run?


I have Linux redhat 7.1
I do this command an then I try to see il tomcat runs by browsing with 
netscape 127.0.0.1:8080 but don't run: why?

Thankyou in advance, Rino.

COMMAND:

[rino@localhost rino]$ cd tomkat/
[rino@localhost tomkat]$ cd jakarta-tomcat-3.2.1
[rino@localhost jakarta-tomcat-3.2.1]$ cd bin/
[rino@localhost bin]$ echo TOMCAT_HOME
[1] 2587
 
bash: TOMCAT_HOME: command not found
[1]+  Doneecho
[rino@localhost bin]$ echo $TOMCAT_HOME
/home/rino/tomkat/jakarta-tomcat-3.2.1
[rino@localhost bin]$ echo $JAVA_HOME
/usr/java/jdk1.3.0_02
[rino@localhost bin]$ export CATALINA_HOME=/usr/java/jdk1.3.0_02
[rino@localhost bin]$ ./tomcat.sh start
Using classpath: 
/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/ant.jar:/home/rino/t
omkat/jakarta-tomcat-3.2.1/lib/jasper.jar:/home/rino/tomkat/jak
arta-tomcat-3.2.1/lib/jaxp.jar:/home/rino/tomkat/jakarta-tomcat
-3.2.1/lib/parser.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/li
b/servlet.jar:/home/rino/tomkat/jakarta-tomcat-3.2.1/lib/test:/
home/rino/tomkat/jakarta-tomcat-3.2.1/lib/webserver.jar:/usr/ja
va/jdk1.3.0_02/lib/tools.jar
[rino@localhost bin]$



look the ps command:

[rino@localhost rino]$ ps -e
  PID TTY  TIME CMD
1 ?00:00:04 init
2 ?00:00:00 keventd
3 ?00:00:00 kapm-idled
4 ?00:00:00 kswapd
5 ?00:00:00 kreclaimd
6 ?00:00:00 bdflush
7 ?00:00:00 kupdated
8 ?00:00:00 mdrecoveryd
   67 ?00:00:00 khubd
  540 ?00:00:00 syslogd
  545 ?00:00:00 klogd
  559 ?00:00:00 portmap
  574 ?00:00:00 rpc.statd
  668 ?00:00:00 apmd
  717 ?00:00:00 automount
  729 ?00:00:00 atd
  744 ?00:00:01 sshd
  764 ?00:00:00 xinetd
  793 ?00:00:00 lpd
  827 ?00:00:00 sendmail
  840 ?00:00:00 gpm
  852 ?00:00:00 crond
  970 ?00:00:11 xfs
 1007 tty1 00:00:00 mingetty
 1008 tty2 00:00:00 mingetty
 1009 tty3 00:00:00 mingetty
 1010 tty4 00:00:00 mingetty
 1011 tty5 00:00:00 mingetty
 1012 tty6 00:00:00 mingetty
 1013 ?00:00:00 gdm
 1014 ?00:00:00 forge_server
 1021 ?00:00:18 X
 1022 ?00:00:00 gdm
 1033 ?00:00:00 ksmserver
 1141 ?00:00:00 kdeinit
 1143 ?00:00:00 kdeinit
 1145 ?00:00:00 kdeinit
 1148 ?00:00:08 artsd
 1151 ?00:00:00 kdeinit
 1165 ?00:00:00 kdeinit
 1167 ?00:00:00 knotify
 1168 ?00:00:01 kdeinit
 1170 ?00:00:01 kdeinit
 1172 ?00:00:03 kdeinit
 1178 ?00:00:40 autorun
 1184 ?00:00:00 kdeinit
 1185 ?00:00:00 kdeinit
 1187 ?00:00:00 kdeinit
 1188 pts/000:00:00 cat
 1222 ?00:00:00 kppp
 1223 ?00:00:00 kppp
 2418 ?00:00:00 java
 2445 ?00:00:00 java defunct
 2446 ?00:00:00 java
 2447 ?00:00:00 java
 2451 ?00:00:00 java
 2478 ?00:00:00 java defunct
 2479 ?00:00:00 java
 2480 ?00:00:00 java
 2490 ?00:00:05 kmail
 2493 ttyS100:00:00 pppd
 2522 ?00:00:00 kdeinit
 2523 pts/300:00:00 bash
 2549 pts/300:00:01 pan
 2551 ?00:00:00 esd
 2552 pts/300:00:00 pan
 2553 pts/300:00:00 pan
 2558 ?00:00:00 kdeinit
 2561 pts/400:00:00 bash
 2590 pts/400:00:00 java
 2617 pts/400:00:00 java defunct
 2618 pts/400:00:00 java
 2619 pts/400:00:00 java
 2621 pts/500:00:00 bash
 2647 pts/500:00:02 netscape-commun
 2682 pts/500:00:00 netscape-commun
 2684 pts/500:00:00 ps
[rino@localhost rino]$




RE: Problems with ajp13, mod_jk, and load balancer

2001-06-22 Thread GOMEZ Henri

You could try to increase the number of Ajp13
threads in server.xml

Also try to increase mod_jk cachesize :

worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp13.cachesize=8


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




jsp:include question - weird URL with ..

2001-06-22 Thread Christian Cabanero

Hi,

I have a question about using jsp:include.  I have a relative URL that has a
.. in it.

jsp:include page=afx_2001_05_25_ANL_5310-1539-NEW.ECO.CBK.ANL.USA...html
flush=true /

What's weird is that the html file doesn't get included when viewing the jsp
page.  Nor does it generate any errors, it's just simply ignored and the
contents of the html file don't show up when viewing the JSP file.  But, if
I view the file normally, not going through the jsp:include, and just point
my browser directly to the html file itself it works fine.  The problem
seems to be linked to the .. before the .html because when I remove it
it works fine, but unfortunately these file names are generated and I can't
get around having the .. in it.

Any help would be greatly appreciated!

Thanks,
Christian Cabanero




RE: Help! Novice to Tomcat

2001-06-22 Thread Ganga

Thanks Jann.

Your help was valuable.  I could get the tomcat finally running.

-Original Message-
From: Jann VanOver [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 23 June 2001 7:16 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Help! Novice to Tomcat


Take the %path% off of your JAVA_HOME

Then, if you're still getting this meesage, you must be on win95/98.  Check
out this newsgroup archives for running tomcat on win98 for the answer.

-Original Message-
From: Ganga [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 2:23 PM
To: [EMAIL PROTECTED]
Subject: Help! Novice to Tomcat


Hello all

I am unable to startup Tomcat3.2.2. Any help to resolve my problem is much
appreciated.

I have downloaded jakarta-tomcat-3.2.2zip and I have extracted the file
under c:\tomcat directory.

I have also added the following in tomcat.bat

set TOMCAT_HOME=c:\tomct
set JAVA_HOME=c:\jdk1.3.0_02;%path%

My PC is Windows ME and following is error message:

C:\tomcat\binstartup
Out of environment space
Including all jars in c:\tomcat\lib in your CLASSPATH.
Out of environment space

Using CLASSPATH: c:\tomcat\classes

Out of environment space
Starting Tomcat in new window
Cannot find file
'c:\jdk1.3.0_02;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\WINDOWS\SMITH
\PPLUSO~1\\bin\java'
(or one of its components). Check to ensure the path and filename
are correct and that all required libraries are available.

Many thanks for your time and assistance.

Regards








Re: User IP Address

2001-06-22 Thread Daniel Koo

Hi Corey,

FYI, that is the way the header has been misspelt in the HTTP RFCs


  
   one thing to note that i discovered the hard way.. referrer
   should be spelled
   as so:
  
   request.getHeader(referer)
  
   not sure why... but i beat my head against the wall for an
   hour... until i
   tried the alternate spelling...
  
   Cj
  
  

-- 
[EMAIL PROTECTED]
Computer Science and Engineering, UNSW



Ports for Workers

2001-06-22 Thread Max Hugen



Could anyone advise me (or point to a resource) on 
the ports that are available for use by Tomcat workers in the workers.properties 
file?

We start a number of Tomcat instances, one for each 
web application we run on our server. We are currently using ports:
8007
8009
8011
8013
8103

We run Tomcat 3.2.1 and Apache 1.3.6 on Linux 
2.2.16. We use mod_jk with ajp13 connectors.

Unfortunately, I really don't know why we use the 
ports we do, and which I should or shouldn't use. Any advice most welcome by 
this newbie!

MTIA, Max Hugen


Re: JDK CLASSPATH vs TOMCAT CLASSPATH

2001-06-22 Thread Dennis Murphy

Hey There!

I did learn more stuff.

What had happened is that along the way I explicitly added WEB-INF/classes to my
TOMCAT path in my tomcat.bat file.  I figured this would be harmless.  But I
guess it does effect CLASS RELOADING.

Therefore, I found if you want CLASS RELOADING to work DO NOT place your
WEB-INF/classes path in the system CLASSPATH or explicitly in the
TOMCAT_CLASSPATH.

Wow! I took me all day to get this working :-(

Dennis

Dennis Murphy wrote:

 Hi Again,

 No one got back to me but I did learn a few things today:

 1. No need to tell the system class path about the WEB-INF area.  All I need
 to do is compile from WEB-INF/classes and JDK finds all of my custom
 packages.  This is b/c by default . is added to JDK's path.

 2. I think I know why TOMCAT can't find my classes. That's b/c I do not have
 a /WEB-INF/lib folder.  I think this folder should contain the webapp class
 loader among other things.

 When I installed TOMCAT 3.2.1 out of the box - the examples webapp did not
 have a /WEB-INF/lib folder (unless I accidentally deleted it!).

 Question: Where do I download the required files for the /WEB-INF/lib
 folder?  Or do I have to build them?

 Dennis

 Dennis Murphy wrote:

  Hi,
 
  I'm new to JSP.
 
  I desire to use the class reloadable=YES feature in TOMCAT so that I
  can develop my JAVA BEANS and quickly test them without restarting
  TOMCAT for every little change.
 
  I believe that the reloadable feature will not work if I inform the
  system CLASSPATH where my JSP application classes are located.  The
  reason for this is that the once the SYSTEM CLASS LOADER loads my
  classes the TOMCAT CLASSLOADER has no control and is unable to
  unload/reload my classes.
 
  Okay if I'm right on my understanding of this, then how do you setup a
  development environment.  In order for me to compile my JAVA BEANS using
  JDK javac, I must tell JDK where my classes are located in the SYSTEM
  CLASS PATH ... else it won't be able to pickup my custom packages that
  are part of my application.
 
  So is this like a trade-off? Compile JAVA BEANS or use the TOMCAT class
  reloading feature - but not both?
 
  Can someone please shed some light on how one should setup a development
  environment?  I would like to have the ability to compile and then test
  with tomcat configured to reload classes.
 
  Thank you,
  Dennis




Re: Tomcat 3.2.2 Vs Tomcat3.1.1

2001-06-22 Thread Frans Thamura

Upgrade it, it works

Frans
-Original Message-
From: Govind Agarwal [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Tuesday, June 19, 2001 9:18 PM
Subject: Tomcat 3.2.2 Vs Tomcat3.1.1


Hi all,

I am using Tomcat 3.1.1 with IIS and want to upgrade my application to
3.2.2
version.

Any Info on the major changes to be done for this would be helpful.

Thanks in Advance
Govind



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




mod_jk problem...

2001-06-22 Thread Saurabh Shukla

hii all,


 I am trying to integrate tomcat 3.3 with apache 1.3.19, and I am using
mod_jk on a Red hat 6.2.
I have build apache from source.

While trying to restart apache I get the following error.

Syntax error on line 1 mod_jk.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not
included in the server configuration
apache/bin/apachectl restart: httpd could not be started

can some one please give me any hints on what can be done to resolve the
problem ?

Do I need to build apache again ? with some directive which includes mod_jk
module.

Regards,
Saurabh

 This is my mod_jk.conf which is included in my
httpd.conf===

LoadModule jk_module libexec/mod_jk.so (the mod_jk.so is there in
apache/libexec)
AddModule mod_jk.c
JkWorkersFile PATHworkers.properties
JkLogFile PATH/mod_jk.log
JkLogLevelinfo
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkMount /*.jsp ajp12
JkMount /servlet/* ajp12
JkMount /examples/* ajp12







RE: Context loading of .properties files

2001-06-22 Thread Saurabh Shukla


For every context make an Entry into your web.xml and add a servlet which
loads on start up.

The each servlet loads your properties file.

and Use URL mapping, to load the appropirate servlet.

HTH,
Shuklix


-Original Message-
From: Bryan Connor [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 8:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Context loading of .properties files


Here is another way to thinkabout it...
Create a config table in your database that holds all the properties you
need to run your app.
One record for each context - the key will be the different URL each context
uses.  On startup,  use the URL to hit the database for the record with the
correct properties and go from there.   Keep everything in the database.
Bryan



[EMAIL PROTECTED] wrote:

 I have several contexts which use a .properties file for configuration.
 I
 need each context to have its own version of that configuration file.  Is
 there a way to load properties files based on context?  I am looking for a
 way to load properties files that is similar to the way in which class and
 lib files are loaded by the servlet class loader.  Ideally, the properties
 files would be automatically loaded from some place under the WEB-INF
 directory of a given contest.
  
 Thanks,
 ron

__
Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/




how to change list subscription options

2001-06-22 Thread [EMAIL PROTECTED]

Is there no way I can change my subscription options to receive individual
messages rather than a digest?

Anwar