RE: Tomcat and firewalls...

2001-10-24 Thread David A. Fuess

I use Zone Alarm and it doesn't bother Tomcat at all.

Dave

At 01:54 PM 10/23/2001 +0100, you wrote:
I use ZoneAlarm and I've found that I have to turn it off in order to use
Tomcat

Dave



-Original Message-
From: Thomas Diamond [mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 01:47
To: [EMAIL PROTECTED]
Subject: Tomcat and firewalls...


I think that something's wrong with Tomcat and firewalls
As I've written in previous letters I had some problems with Win2K
crashing inexplicably while running Tomcat. The system was rebooting on
its own. After I disabled the atomatic reboot feature I got a Blue
Screen saying something about vsdatant.sys ( a file installed with
ZoneAlarm ). I also had some other problems with ZoneAlarm so I
completely removed it from my system. OK, I said to myself, now you are
safe. Today, while I was testing my JSPs locally I got a blue screen
saying something about DRIVER_IRQL_NOT_LESS_OR_EQUAL  and  mentioning
a file called nisdrv.sys. I searched a bit and found that this is a
file installed with Norton Internet Security (I've got version Norton
Internet Security 2001 version 2.5 installed). So what's goig on? Tomcat
cannot run in a machine with a firewall or I 've done it again ?

Tom.

 From the Desk of ...
David A. Fuess
[EMAIL PROTECTED], http://www.Fuess.Net




Servlet mapping with /

2001-10-24 Thread Dr. Evil


I'm trying to do something tricky with a servlet mapping for /.
Basically, one machine will be serving a bunch of different hostnames
from one IP address.  For various reasons which I won't go into right
now, it is an absolute impossibility to have separate IP addrs for
these different machines, and also we can't configure them as virtual
hosts in the server.xml file (trust me on this, it's an absolute
impossibility).  All the files that are served are in a few specific
directories, like /statichtml, or /userhtml or whatever, which contain
either static html or jsp pages.  So here's what I did:

I put this line in web.xml for the app:

   servlet-mapping
  servlet-name
director
  /servlet-name
  url-pattern
/
  /url-pattern
   /servlet-mapping

I created a servlet called director.java, which would look at various
parameters in the request, and then forwards it to the right place
like this:

RequestDispatcher rd =
request.getRequestDispatcher(/staticpages/hello.html);
rd.forward(request, response);

or

RequestDispatcher rd =
request.getRequestDispatcher(/dynamic/hello.jsp);
rd.forward(request, response);

What happens is that when RequestDispatcher.forward() is called, it
goes back through the mappings list, and sends the request straight
back to director.java, which then looks at it and forwards it
again, etc, in an endless loop.  I understand what's going on, but is
there a way to do it differently?

I tried this also:

  RequestDispatcher rd =
  ServletContext.getNamedDispatcher(settings.corphtmlindex);

but then I got this error:

RequestDispatcher rd = ServletContext.getNamedDispatcher(/statichtml/hello.html);
  ^
director.java:159: non-static method getNamedDispatcher(java.lang.String) cannot be 
referenced from a static context

I'm not sure what's going on here.

One thought I had was this: in the mappings list, more specific
mappings override less specific mappings, and / is the least specific
mapping possible.  Is there a way to put in mappings in web.xml to
prevent the director servlet from being called?

This seems like it would be a common thing to do under the MVC model,
so there must be some solutions out there.

Thanks



Re: deploying the generated class files instead of jsps

2001-10-24 Thread Dmitri Colebatch

yep - you want to compile your jsps.  have a look at jspc - sorry, not
exactly sure what the best starting point would be.  The jspc.sh script is
probably a good bet, followed by the archives (o:

cheers
dim

On Tue, 23 Oct 2001, Mike Muir wrote:

 
 I was wondering if there is a way to deploy the generated
 class files (in the work directory), rather than the jsps.
 Essentially, I don't wan't it to ever check the jsps (because
 I don't want to distribute them); instead, I want it to
 go directly to the class files in the work directory (or,
 ideally, to a jar/war of those class files).
 
 Thanks.
 
 --
 Mike Muir
 TransactTools, Inc.
 




RE: Compilation Error when building Tomcat

2001-10-24 Thread Nitin Vira

Hi,

Why am i getting this error while building tomcat4.0?  i am using ant 1.4

C:\Tomcat\temp\jakarta-tomcat-4.0C:\Tomcat\jakarta-ant-1.4\bin\ant -projecthelp

Searching for build.xml ...
Buildfile: C:\Tomcat\temp\jakarta-tomcat-4.0\build.xml

BUILD FAILED

C:\Tomcat\temp\jakarta-tomcat-4.0\build.xml:239: Class org.apache.tools.ant.task
defs.Zip doesn't support the nested zipfileset element


the line in question is following in build.xml
zip zipfile=${tomcat.dist}/${final.name}.zip
  zipfileset dir=${tomcat.dist} prefix=${final.name} 
   includes=bin/** /



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 12:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Compilation Error when building Tomcat




On Tue, 23 Oct 2001, Nitin Vira wrote:

 Date: Tue, 23 Oct 2001 11:52:54 -0700
 From: Nitin Vira [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Compilation Error when building Tomcat

 i had got the jakarta-serlvetapi-4 from the website and i had checked
 that it has the methods are required but ant is not picking up that
 jar its reading from somewhere else, does it read some classpath.


You have total control over where each JAR file is taken from, by
configuring the build.properties file.  The quickest way to set this up
is to copy build.properties.sample to build.properties and then edit
it to suit.  The properties that matter for this purpose are
servlet.home, servlet.lib, and servlet.jar.

Craig




RE: Compilation Error when building Tomcat

2001-10-24 Thread Nitin Vira

When i am using the older version(Readme has following title $Id: README.txt,v 1.17 
2001/08/25 03:51:27 craigmcc Exp $) of the source i get following error


tomcat-docs:

BUILD FAILED

C:\jakarta-tomcat-4.0-rc1-src\webapps\tomcat-docs\build.xml:84: Class org.apache
.tools.ant.taskdefs.XSLTProcess doesn't support the nested param element

Any suggestion as to why this is happening.
Appreciate your help.
Thanks,
Nitin



-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: Compilation Error when building Tomcat




On Tue, 23 Oct 2001, Nitin Vira wrote:

 Date: Tue, 23 Oct 2001 10:12:43 -0700
 From: Nitin Vira [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Compilation Error when building Tomcat

 Hi Craig,

 I figured as much, but i dont quite get from where to get the latest servlet.jar and 
where to put and make the ant pick up this jar and not any other.
 Thanks once again for your help.


See the BUILDING.txt file in the top level source directory of Tomcat.
It tells you exactly where to get everything (including getting the latest
Servlet and JSP classes from the jakarta-servletapi1-4 repository).

 Nitin


Craig




Re: sourcepath problem in building tomcat

2001-10-24 Thread Bill Cai

It is jdk 1.2.1:

java version 1.2.1
Solaris VM (build Solaris_JDK_1.2.1_04, native
threads, sunwjit)

Thanks,

Bill

--- Bill Cai [EMAIL PROTECTED] wrote:
 I thought that I was using at least jdk1.2. But I
 willl check tonight because I have multiple jdks
 installed.
 
 Thanks,
 
 Bill
 
  From: Larry Isaacs 
   Subject:  RE: sourcepath problem in building
  tomcat
   Date:  Tue, 23 Oct 2001 12:51:51 -0400
  
   It appears that the javac being executed is
 coming
  from
   JDK 1.1.8.  Is JDK1.1.8 what you want to be
 using,
   or is an old javac being picked up by mistake? 
 If
   JDK 1.1.8 is correct, I would like to see the
 log
   for the detect: through init: targets.
  
   Larry
  
  --- Bill Cai [EMAIL PROTECTED] wrote:
   I always got the following error when building
   tomcat
   by using ant. I tried ant 1.1 1.2 1.4. Any idea?
   
   tomcat_util:
   [javac] Compiling 91 source files to
  
 

/usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build/tomcat/classes
   [javac] javac: invalid flag: -sourcepath
   [javac] use: javac
  
 

[-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
   path][-nowrite][-deprecation][-d dir][-Jruntime
   flag] file.java...
   
   BUILD FAILED
   
  
 

/usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build.xml:206:
   Compile failed, messages should have been
  provided.
   
   
  
 __
   Do You Yahoo!?
   Make a great connection at Yahoo! Personals.
   http://personals.yahoo.com
  
  
  __
  Do You Yahoo!?
  Make a great connection at Yahoo! Personals.
  http://personals.yahoo.com
  
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



getNamedDispatcher

2001-10-24 Thread Dr. Evil


Hi, I am trying to use ServletContext.getNamedDispatcher(String) to get
a RequestDispatcher object in my servlet.  The goal of this is to
allow my controller servlet to hand off request processing to another
servlet.  What I have done is set up a default servlet-mapping in my
web.xml file, so that all requests going to the server will be handled
initially by a controller servlet, which will then decide which
servlet should really handle the request.  It will go through its
logic and then come up with a string, which will be the real servlet
which will handle the request.

I'm trying to use getNamedDispatcher so that I can avoid the loop that
would happen because of the default servlet-mapping.  This seems like
it should work.

In my servlet's init method, I do this:

   this.context = getServletConfig().getServletContext();

This works.  context is not null after this call, so it definitely
gets a context.

However, later when I do:

 RequestDispatcher rd =
 this.context.getNamedDispatcher(/static/index.html);

rd comes back as null, and obviously rd.forward(request, response) is
impossible.

Any sugestions on this?  How do I get a servlet to send something to a
named servlet without going through the servlet-mappings again?

Thanks



How to put getRemoteAddr() into SQL server table in Tomcat 4.0 ?

2001-10-24 Thread Miao, Franco CAWS:EX

Source code:

-



if (rs.next())

String updateip =Update tbluser set incomingip= 'request.getRemoteAddr()'
where uname =' + uname + ';

---

No erro come up, but it didn't put remote Ip address into SQL server's
table, value is null, if I change to   '+request.getRemoteAddr()+'  ,
you will see
'+request.getRemoteAddr()+' as the value in SQL table.

Don't know why, looks like request.getRemoteAddr() doesn't function in SQL
statement. Pls advise, thanks!


Franco



upload cache disabling

2001-10-24 Thread E B

Hello
In my app under tomcat 4, I am using orielly's cos.jar
for upload some files. Uploading works fine first
time,
but for the second file if I upload the same file
(different content, same filename), I am not
getting the new file in my servlet. Seems to be
a cache problem. Has anybody else encountered
this problem ? How do I disable the cache ?

I am using
com.oreilly.servlet.multipart.MultipartRequest




Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.



maximum number of concurrent users

2001-10-24 Thread Raju Jacob

Hi ,
How to find out the maximum number of concurrent users supported
by tomcat 3.2.2.
Is there any benchmarks ?

Thanks 
Raju



AW: Newbie question: Has anyone had trouble compiling code containing HttpServletRequest.getRequestURL() ???

2001-10-24 Thread Ralph Einfeldt

Looks like you have an old servlet.jar in your 
compile classpath (or in $JAVA_HOME/jre/lib/ext).

I'm not shure with which JSDK version getRequestURL()
was introduced (2.0 doesn't have it)

 -Ursprüngliche Nachricht-
 Von: Adam Wiener [mailto:[EMAIL PROTECTED]]
 Gesendet: Dienstag, 23. Oktober 2001 22:08
 An: [EMAIL PROTECTED]
 Betreff: Newbie question: Has anyone had trouble compiling code
 containing HttpServletRequest.getRequestURL() ???
snip/
 I get a compilation error saying that the compiler cannot resolve the
 getRequestURL method in the HttpServletRequest Interface.
snip/



Re: Can't get SecurityRoleRef/Tomcat4 working

2001-10-24 Thread Antony Bowesman

Hi Craig,

Craig R. McClanahan wrote:
 
 Unless you have changed something in tomcat-users.xml, the role
 assigned to the tomcat user is tomcat, not Tomcat.  Role
 names, like pretty much everything else in servlets and JSPs,
 are case sensitive.

Sorry, I should have mentioned, I am using my own Jaas realm and have my
own login modules.  I am currently assigning 'Tomcat' as the role in my
test login.

The question still applies, how do you get the role-ref mapping
configured in web.xml when the servlet is a JSP?

Rgds
Antony



RE: apache 1.3.20 and .so files - problem persists.

2001-10-24 Thread Brijesh Kumar

Apache was downloaded from
http://httpd.apache.org/dist/httpd/binaries/win32/ i.e.
apache_1.3.20-win32-no_src-r2.msi is the installable.

mod_webapp from
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/bin/

For both, no compilation was done. I am using a Win2K box.

Any solutions?

Brijesh.

-Original Message-
From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Saturday, October 20, 2001 1:46 AM
To: [EMAIL PROTECTED]
Subject: Re: apache 1.3.20 and .so files - problem persists.
Importance: High


Where did you get Apache 1.3.20? Was it compiled with -DEAPI? What about
mod_webapp? Did you compile it or downloaded it from the distro site?

Pier



Brijesh Kumar at [EMAIL PROTECTED] wrote:

 Resending again... please help.

 Brijesh.

 -Original Message-
 From: Brijesh Kumar [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 16, 2001 2:06 PM
 To: [EMAIL PROTECTED]
 Subject: RE: apache 1.3.20 and .so files - problem persists.


 Hi,

 libapr.dll is also present in  the modules directory.

 Please note that in my Win2K box I also have installed Apache 1.3.12. But
 that has been installed in my C drive while Apache 1.3.20 has been
installed
 in my D drive. Apache 1.3.12 was not up when I started Apache 1.3.20

 Any solutions?

 Brijesh.

 -Original Message-
 From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
 Sent: Monday, October 15, 2001 8:51 PM
 To: [EMAIL PROTECTED]
 Subject: Re: apache 1.3.20 and .so files - problem persists.


 Brijesh Kumar at [EMAIL PROTECTED] wrote:

 Hi,

 I tried that and after starting Tomcat 4.0 and then Apache 1.3.20, I got
 the
 following error.

 Syntax error on line 1033 of d:/apache group/apache/conf/httpd.conf:
 Cannot load d:/apache group/apache/modules/mod_webapp.so into server:
 (127)
 The
 specified procedure could not be found:

 My httpd.conf looks like this.

 Line no 1033: LoadModule webapp_module modules/mod_webapp.so
 Line no 1034: AddModule mod_webapp.c
 Line no 1035: WebAppConnection warpConnection warp localhost:8008
 Line no 1036: WebAppDeploy examples warpConnection /examples/

 I have specified ServerName and VirtualHost entries.

 I also tried after commenting the VirtualHost entries and AddModule
 entried.
 That too didn't work out. What could be the problem?

 It seems that your Apache can't load the module because of a lack of
 dependencies... Did you copy also libapr.dll into your /modules/
directory?

   Pier



-Original Message-
From: Pier Fumagalli [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 7:40 PM
To: [EMAIL PROTECTED]
Subject: Re: apache 1.3.20 and .so files.
Importance: High


Brijesh Kumar at [EMAIL PROTECTED] wrote:

Hi,

I have a Windows 2000 box and recently downloaded
apache_1.3.20-win32-no_src-r2.msi from
http://httpd.apache.org/dist/httpd/binaries/win32/

Once I ran the MSI, it installed the Apache 1.3.20.

But the modules directory lists all .so files. As far as I know .so files
work only in Unix / Linux platform. I had earlier installed Apache 1.3.12
and it had all .dll files under modules directory.
 Did I get the wrong version? If it is so where do I get Apache 1.3.20 for
 Windows.

No... The .so files ARE indeed modules for Windows.

Secondly if this is the right version indeed, where do I get the
mod_webapp
file? I need to get the Tomcat 4.0 to work with Apache 1.3.20.

http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/bin/




mod_webapp and datasource failure

2001-10-24 Thread Brett Porter

Hi,

I have looked into the mail archives and seen others with the same 
problem: when using WARP, datasources don't work as they get deployed as 
null. The solutions mentioned were:
1) set ServerName to an IP address and the same in both that and 
server.xml - didn't work, tried various combinations
2) use nightly builds of mod_webapp - doesn't compile with a stock 
tomcat 4.0.1 ditribution when it gets to warp.jar.

It certainly seems to be attempting to deploy the webapp twice - it logs 
the first time successfully in localhost_log_..., and fails when you 
start apache and it logs that to cataline_log_... using the loggers from 
the example server.xml.

Is there any solution to this, other than using a snapshot build of tomcat?
Is my best alternative to use a snapshot, the release AJP connector 
(haven't tried it), or try and tunnel requests to a HTTP connector?

Thanks,
Brett





Questions on tomcat heap usage and garbage collection (avoiding OutOfMemoryError exceptions)

2001-10-24 Thread Bang, Steinar

Platform:   Intel PIII 797.499MHz, 256MB RAM
Debian Woody GNU/Linux,
kernel 2.2.19
Blackdown J2SDK 1.3.1
apache 1.3.19
tomcat 3.2.3

When using httperf[1] to stresstest JSPs on the above 
platform, I'm running into the OutOfMemoryError 
exception problem:
http://www.jguru.com/faq/view.jsp?EID=64889

The solution suggested in the URL above, is to increase
the heap size, but this is just pushing the problem
ahead.  The important thing for us, is that tomcat doesn't die.

If this is a problem for high load sites, JSP technology
would be unusable, and obviously it isn't.  So what
do others do?

Possible alternatives:
 1. increase the heap size to something astronomical,
and just hope for the best? 
 2. tune apache/tomcat to restart more often, so that
the max heap size aren't reached before the tomcat
processes are restarted?
 3. catch the exception?
 4. use some kind of watchdog to restart tomcat?

Question 3 raises more questions:
 3a. What do you do when you catch the exception?
 There isn't much you _can_ do if you don't have
 any memory left.  Maybe force a garbage collection
 and then re-run the request?
 3b. Why do all the tomcat processes connected to
 apache processes die, if one of them gets an
 OutOfMemoryError exception

Which brings us to question 2: tuning apache/tomcat:
When reading the documentation, I thought that there
was supposed to be a single tomcat process, serving
all requests.  However top reports a lot of tomcat
processes, when I'm stresstesting the server, which
leads me to belive that there is a separate tomcat
process for each apache server process running.
Is this correct?

In any case; based on this assumption, I reduced
the number of currently running apache processes
from the default 150 to 20, with dramatically
changed behaviour: instead of running with a 20%
load, the machine was running at an 80%-90% load
with less physical memory used (restarting processes
is a lot of work).

However, even with the high load, the end result
was a lot more stable.  Watching the tomcat processes
in top, I could watch them grow up to around 82MB,
before there suddenly was a lot of processes with
around 19MB.

It wasn't completely stable though.  I set up
httperf to do 1 million requests, before I left
last night, and it only got to 51927 before tomcat
died.

I run httperf from a different machine (PIII 800MHz),
using the command:
httperf --server=no-video2 --port=80 --uri=/tps-sba/Welcome.jsp
--rate 150 --num-conns=100 --num-calls=1
(--num-conns varies.  I have mostly been using 
1).


The memory usage observed in top, also raises some
questions related to my question 1:
 1a. Why does tomcat processes always start at around
 19MB, no matter what I've set the initial heap
 size to be?
 1b. Why does the initial heap size seem to matter
 for my stability if the processes always start
 at 19MB?  Is it all in my head?

I'm interested in all direct experiences, ideas,
guesses, answers, etc.

Thanx!


- Steinar


[1] http://freshmeat.net/projects/httperf


 

















This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
TANDBERG Television. If received in error please notify the sender and
destroy the original message and attachments.



Rotation of AccessLog

2001-10-24 Thread Peter Romianowski

Hi,

I have a problem with accesslog-rotation on Tomcat 4.0.1 (an previous TC
4). First I thought it would be the right behaviour that the log is rotated
upon each restart. But now I took a look into the AccessLogValve (actually I
wanted to implement the rotation that works even if the server runs) and if
I read it right, then the Logrotation should work - but it doesn't. Is this
a bug? Or am I doing something wrong?

cheers,
pero




servlet upload

2001-10-24 Thread E B

In my webapp under tomcat, I am using oreilly's
cos.jar for uploading files. I observe that 
repeated uploading of same file fails. ie., when
I upload a file for second time(different content,
same file name), in my servlet I am getting the
old file only. It is probably due to caching,
 does anybody know how do disable this caching ?

the files are jar files. does jvm cache them ?
or tomcat ? I see some jar cache files in the temp.
The class used to access the uploaded file is
com.oreilly.servlet.MultipartRequest



Nokia Game is on again. 
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.



RE: Servlet mapping with /

2001-10-24 Thread dave . prout

Dr Evil,

This is how I do it, a little perverse, but it works.

In the root, have something like this in the web.xml

 servlet
servlet-nameDefault Page/servlet-name
jsp-file/mid.jsp/jsp-file
/servlet
servlet-mapping
servlet-nameDefault Page/servlet-name
url-pattern/url-pattern
/servlet-mapping


Thus ensuring that mid.jsp is called. 

mid.jsp just contains

response.sendRedirect(mid/Index);

i.e. redirect to a new conext called mid, and run servlet Index

Servlet Index does this


getServletConfig().getServletContext().getRequestDispatcher(/new.jsp).forw
ard(req, res);


More detials will be supplied in return for a brown papaer package

Have fun

Dave 


-Original Message-
From: Dr. Evil [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 03:39
To: [EMAIL PROTECTED]
Subject: Servlet mapping with /



I'm trying to do something tricky with a servlet mapping for /.
Basically, one machine will be serving a bunch of different hostnames
from one IP address.  For various reasons which I won't go into right
now, it is an absolute impossibility to have separate IP addrs for
these different machines, and also we can't configure them as virtual
hosts in the server.xml file (trust me on this, it's an absolute
impossibility).  All the files that are served are in a few specific
directories, like /statichtml, or /userhtml or whatever, which contain
either static html or jsp pages.  So here's what I did:

I put this line in web.xml for the app:

   servlet-mapping
  servlet-name
director
  /servlet-name
  url-pattern
/
  /url-pattern
   /servlet-mapping

I created a servlet called director.java, which would look at various
parameters in the request, and then forwards it to the right place
like this:

RequestDispatcher rd =
request.getRequestDispatcher(/staticpages/hello.html);
rd.forward(request, response);

or

RequestDispatcher rd =
request.getRequestDispatcher(/dynamic/hello.jsp);
rd.forward(request, response);

What happens is that when RequestDispatcher.forward() is called, it
goes back through the mappings list, and sends the request straight
back to director.java, which then looks at it and forwards it
again, etc, in an endless loop.  I understand what's going on, but is
there a way to do it differently?

I tried this also:

  RequestDispatcher rd =
  ServletContext.getNamedDispatcher(settings.corphtmlindex);

but then I got this error:

RequestDispatcher rd =
ServletContext.getNamedDispatcher(/statichtml/hello.html);
  ^
director.java:159: non-static method getNamedDispatcher(java.lang.String)
cannot be referenced from a static context

I'm not sure what's going on here.

One thought I had was this: in the mappings list, more specific
mappings override less specific mappings, and / is the least specific
mapping possible.  Is there a way to put in mappings in web.xml to
prevent the director servlet from being called?

This seems like it would be a common thing to do under the MVC model,
so there must be some solutions out there.

Thanks



RE: Tomcat and firewalls...

2001-10-24 Thread dave . prout

Dave,

Maybe I've got my ZoneAlarm seetings wrong. I use the basic version
(not Pro), on my home pc, and run Tomcat/Java/MySql on that pc. My
application doesn't seem to work when I have ZoneAlarm on. I'd like it to,
as I hate leaving my home server wide open when I go to work.

Dave 



-Original Message-
From: David A. Fuess [mailto:[EMAIL PROTECTED]]
Sent: 24 October 2001 03:17
To: [EMAIL PROTECTED]
Subject: RE: Tomcat and firewalls...


I use Zone Alarm and it doesn't bother Tomcat at all.

Dave

At 01:54 PM 10/23/2001 +0100, you wrote:
I use ZoneAlarm and I've found that I have to turn it off in order to use
Tomcat

Dave



-Original Message-
From: Thomas Diamond [mailto:[EMAIL PROTECTED]]
Sent: 23 October 2001 01:47
To: [EMAIL PROTECTED]
Subject: Tomcat and firewalls...


I think that something's wrong with Tomcat and firewalls
As I've written in previous letters I had some problems with Win2K
crashing inexplicably while running Tomcat. The system was rebooting on
its own. After I disabled the atomatic reboot feature I got a Blue
Screen saying something about vsdatant.sys ( a file installed with
ZoneAlarm ). I also had some other problems with ZoneAlarm so I
completely removed it from my system. OK, I said to myself, now you are
safe. Today, while I was testing my JSPs locally I got a blue screen
saying something about DRIVER_IRQL_NOT_LESS_OR_EQUAL  and  mentioning
a file called nisdrv.sys. I searched a bit and found that this is a
file installed with Norton Internet Security (I've got version Norton
Internet Security 2001 version 2.5 installed). So what's goig on? Tomcat
cannot run in a machine with a firewall or I 've done it again ?

Tom.

 From the Desk of ...
David A. Fuess
[EMAIL PROTECTED], http://www.Fuess.Net



Where can i set up my datasource?

2001-10-24 Thread Jaime Garcia Bonis

Hi everyone;

Could anyone tell me where i can set up a datasource I know I
have some tags like resource and so on in the web.xml But Where i have

to set up the connection stream (jdbc:oracle:thin:@zagarron:1521:orcl)
the user and password to connect to the data base

Thanks in advanced



Tomcat 3.3 classpath

2001-10-24 Thread Hornsby Peter

Cheers for the earlier suggestion on the problems with using Saxon, I've
now installed Tomcat 3.3 and that problem has disappeared.  However:
Tomcat is installed in d:\tomcat3.3.  I want to reference some class
files in d:\.  I've tried editing the :staticClasspath part of
tomcat.bat, putting the line 

set CLASSPATH=%CLASSPATH%;d:\

at the end, but this doesn't seem to resolve the problem...any thoughts?

Cheers,
Pete


-- 
The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution, 
or any action taken or omitted to be taken in reliance on such information is
prohibited and may be unlawful.



Re: Tomcat 4.0.1 not updating the webapp

2001-10-24 Thread Sergey V. Udaltsov

 I think it's a JDK bug. Since the WAR will be opened through a JAR URL, it
 is cached by the JDK until the JVM is terminated. I tried everything (since
 it caused another problem), but there's no workaround unless you make the
 URLs strings different.
Cool! OK, I'll try IBM's JDK.

 I'm not 100% sure, but I don't think that file based JAR URLs have that
 problem.
I use the jar:file://... url. Do you say that I have to unpack my WAR
before deploying?

Regards,

Sergey




Precompiled jsp's

2001-10-24 Thread Thys De Wet (ZA)

Ok so I got my  JSP's compiled into class files..
Placed them in /WEB-INF/classes..
Now how do I tell Tomcat 3.2.3 to use these class files ... 

ANy help 

PLEASE ..

*begs on knees*



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

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



More experiments with changing the default (/) mapping

2001-10-24 Thread Dr. Evil


I have figured out a few things about how servlet-mapping and
RequestDispatcher might work together.

If I put in a servlet-mapping entry for /* (which will catch every
request coming in to the server, which is something which I need to
do), and I make the servlet which handles it look like this:

RequestDispatcher rd = context.getNamedDispatcher(default);
rd.forward(request, response);

then it works for serving plain old static files.  In toher words,
http://localhost/foo/bar.html will get the bar.html from the /foo
directory.

This leaves me with two problems:  First, if I understand correctly,
servlets are not allowed to modify the HttpRequest object.  This means
that my director servlet can't change which director bar.html will be
in.  This is bad for me.

Second, I can't get it to work at all for jsp pages.  I would have
thought that:

RequestDispatcher rd = context.getNamedDispatcher(jsp);
rd.forward(request, response);

would work but it doesn't.  I get an exception with a message
org.apache.jasper.JasperException: No output directory: String index
out of range: -1.  I can't figure out why that is happening or what
to do about it.

So, any sugestions on a) changing the paths default and jsp will
use to get their source pages from and b) how to get jsp to work?

I also thought about doing this with filters, but the problem with
filters is that they can only dispatch to servlets, not to jsp or html
pages, which is what I need to do.  Any sugestions would be most
appreciated.

Thanks



Newbie

2001-10-24 Thread Sean Alphonse


Hello.

I have Apache and Tomcat configured to work with each other ( so I
believe ).

I have installed the following:

Linux/Red Hat 7.1
Apache 1.3.19 (RPM)
Tomcat 4 (RPM)
mod_webapp 1 (RPM)
tomcat4-webapps (RPM)

On a Red Hat system with Apache 1.3.19 the default directory for html files
are /var/www/html.
On a Red Hat system with Tomcat 4 the default directory for JSP or servlets
is /var/tomcat4/webapps/ROOT.

Now, I am wondering when I create a JSP script in an html file where this
file should go. Should it go in the default directory of Apache? Does Apache
with the aid of Tomcat recognize that there is JSP script?

Thank-you for your time.

Sean Alphonse.




JDBC Problem

2001-10-24 Thread The Duke

When I want to open a connection to the oracle database I get a sql exception and the 
message that the Network Adapter could not establish the connection.

I use following :
- oracle.jdbc.driver.OracleDriver
- jdbc:oracle:thin://hostname/dbname

Can anyone help?

Dennis


Make a difference, help support the relief efforts in the U.S.
http://clubs.lycos.com/live/events/september11.asp



X Windows and Tomcat

2001-10-24 Thread Krasi Zlatev

Why when I close X Windows, Tomcat exits?

Thank you!

=
Krasi Zlatev
Enjoy!

__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



RE: Help ... Weird Problem

2001-10-24 Thread Randy Layman


Depending upon which version of Tomcat you are using:
1.  TC 3.2 and previous have a bug where a misconfiguration can
cause the CPU load to spike and the page to never be served
2.  Some versions don't handle the situation where you require
authentication but set the constraints such that the login page also needs
authentication (creating an endless loop)

If you did a clean install then whatever might have been hacked,
regarding Tomcat, will have been replaced.

If the JVM was corrupt you would be getting crashes and not endless
processing.

Is Tomcat outputting any information to STDOUT/STDERR/its log files
that would be relevant to this?

Randy

 -Original Message-
 From: A.L. [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 7:35 PM
 To: [EMAIL PROTECTED]
 Subject: Help ... Weird Problem
 
 
 Everything has been working fin ewith Tomcat until all
 of a sudden certain web apps stopped working.   I have
 no idea what could have happened.  I tried to
 reinstall Tomcat, and when I do so, all the admin web
 apps work fine, but ones that I have created that were
 working before no longer work.  I'm worried that
 perhaps someone has hacked into my computer.
 
 The problem I get now is that when I try to view a
 page on the localhost: the browser continues to try to
 load the page, but is unable to.  What I am wondering
 is if it is possible that the jvm I downloaded from
 sun could become corrupt.  What wlse could cause such
 a weird problem.
 
 -Thanks
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 



AW: How to put getRemoteAddr() into SQL server table in Tomcat 4.0 ?

2001-10-24 Thread Ralph Einfeldt

The request.getRemoteAddr() must be outside the string:

 String updateip =
  Update tbluser set incomingip= ' + 
  request.getRemoteAddr() + 
  ' where uname =' + uname + ';

 -Ursprüngliche Nachricht-
 Von: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Oktober 2001 07:18
 An: '[EMAIL PROTECTED]'
 Betreff: How to put getRemoteAddr() into SQL server table in 
 Tomcat 4.0
snip/
 String updateip =Update tbluser set incomingip= 
 'request.getRemoteAddr()'
 where uname =' + uname + ';
snip/
 No erro come up, but it didn't put remote Ip address into SQL server's
 table, value is null, if I change to   
 '+request.getRemoteAddr()+'  ,
 you will see
 '+request.getRemoteAddr()+' as the value in SQL table.
snip/



RE: Win2K IIS/Tomcat hangs

2001-10-24 Thread Larry Isaacs

Hi Dan,

I can't tell from the log, but I believe this is the
symptom you would get if you accidentally used the
isapi_redirect.dll from Tomcat 3.2.3 with Tomcat 3.3.
To be safe, I would double check this.

To shoot in the dark a little bit, what happens if
Tomcat isn't running when you try this.  Does it behave
the same way or provide an error like it should?  Maybe
something else is on the receiving end.  For fun,
you could try switching to Ajp12 and see if something
different occurs.

In your current setup, does the Tomcat 3.3 log show any
sign that it received anything from the Ajp13 worker?

Cheers,
Larry

 -Original Message-
 From: Dan Rasmussen [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 4:47 PM
 To: [EMAIL PROTECTED]
 Subject: Win2K IIS/Tomcat hangs 
 
 
 
 Hello,
 
 I just joined the list (no confirmation yet so I'm not sure
 this is going to take).  I did check the archives and have
 seen similar postings but no info that fixes my problem...
 
 I have been attempting to get IIS on Win2K/SP2 to play with
 tomcat 3.3.  I have tomcat 3.3 installed and serving up the
 Tomcat examples using this url:
 http://localhost:8080/examples/jsp/index.html.  
 
 I then used the Tomcat IIS HowTo to get IIS setup.  I got
 to the point where I get a green up arrow on the filter but
 when I try to get at 
 
 http://localhost/examples/jsp/index.html
 
 The browser (exploder 5 or netscape 6.1) just hangs (see
 below for the tail of the iis_redirect.log which has a
 happy look about it to my untrained eye).  I did the whole
 bit with making the jakarta virtual directory and adding
 the ISAPI filter.  I don't think I would get this far
 otherwise.  
 
 The redirector is a downloaded binary.  I checked the
 registry entries.  What else could be wrong?  Is there
 something I missed in IIS: Security?, other virtual
 directories besides jakarta?.  Suggestions?
 
 I had no problems integrating with Apache on NT and few
 with Apache on Solaris.  IIS is a different story :( 
 
 Any help greatly appreciated.
 
 Thanks.
 
 Dan Rasmussen
 
 
 [jk_isapi_plugin.c (439)]: HttpFilterProc
 [/examples/jsp/index.html] is a servlet url - should
 redirect to ajp13
 [jk_isapi_plugin.c (461)]: HttpFilterProc check if
 [/examples/jsp/index.html] is points to the web-inf
 directory
 [jk_isapi_plugin.c (517)]: HttpExtensionProc started
 [jk_worker.c (123)]: Into wc_get_worker_for_name ajp13
 [jk_worker.c (127)]: wc_get_worker_for_name, done  found a
 worker
 [jk_isapi_plugin.c (539)]: HttpExtensionProc got a worker
 for name ajp13
 [jk_ajp13_worker.c (654)]: Into jk_worker_t::get_endpoint
 [jk_ajp13_worker.c (539)]: Into jk_endpoint_t::service
 [jk_ajp13.c (346)]: Into ajp13_marshal_into_msgb
 [jk_ajp13.c (480)]: ajp13_marshal_into_msgb - Done
 [jk_connect.c (108)]: Into jk_open_socket
 [jk_connect.c (115)]: jk_open_socket, try to connect socket
 = 2692
 [jk_connect.c (124)]: jk_open_socket, after connect ret = 0
 [jk_connect.c (132)]: jk_open_socket, set TCP_NODELAY to on
 [jk_connect.c (140)]: jk_open_socket, return, sd = 2692
 [jk_ajp13_worker.c (167)]: In
 jk_endpoint_t::connect_to_tomcat, connected sd = 2692
 
 Thats the end of the log as the world spins... waiting for
 its reply.
 
 
 
 =
 -- replies to [EMAIL PROTECTED] --
 
 Anything that appears after this sentence is inserted by 
 Yahoo (or others) and may not be a good idea.
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 



RE: Newbie question: Has anyone had trouble compiling code containing HttpServletRequest.getRequestURL() ???

2001-10-24 Thread Larry Isaacs

Probably a typo below, but getRequestURL arrived with the
Servlet 2.3 spec.  This means it is supported in Tomcat 4.x,
but not in Tomcat 3.x which implements the Servlet 2.2 spec.

Larry

 -Original Message-
 From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 23, 2001 5:41 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Newbie question: Has anyone had trouble compiling code
 containing HttpServletRequest.getRequestURL() ???
 
 
 Hi Adam:
 
   Somewhere in your compiler classpath, you've got an 
 older servlet.jar, as
 the getRequestURL() method arrived in Servlet Spec 2.2.  It may take a
 little hunting to find it, especially if you're using an IDE 
 (I've run into
 this problem with IBM VA-Java v3.5), but what you need to do 
 is get your
 compiler to compile using the servlet.jar that you will find 
 in Tomcat's
 /lib directory.
 
 Good luck, don't get discouraged, it all eventually works 
 pretty well...
 
 Greg Trasuk, President
 StratusCom Manufacturing Systems Inc. - We use information 
 technology to
 solve business problems on your plant floor.
 http://stratuscom.ca
 
  -Original Message-
  From: Adam Wiener [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, October 23, 2001 4:08 PM
  To: [EMAIL PROTECTED]
  Subject: Newbie question: Has anyone had trouble compiling code
  containing HttpServletRequest.getRequestURL() ???
 
 
  Hello,
 
  I am currently running Tomcat 3.2.2 (I know, I've been meaning to
  upgrade...) and I am using the default servlet.jar that comes
  with that
  distribution. Whenever I try to compile the following code:
 
   public void doPost(HttpServletRequest req, HttpServletResponse res)
 throws ServletException, IOException {
   res.setContentType(text/plain);
   PrintWriter out = res.getWriter();
   out.println(req.getRequestURL().toString());
   }
 
  I get a compilation error saying that the compiler cannot 
 resolve the
  getRequestURL method in the HttpServletRequest Interface.
 
  However the following code compiles just fine:
 
   public void doPost(HttpServletRequest req, HttpServletResponse res)
 throws ServletException, IOException {
   res.setContentType(text/plain);
   PrintWriter out = res.getWriter();
   out.println(req.getRequestURI());
   }
 
  am I missing something really obvious?  All the documentation
  I can find
  says the getRequestURL() method is valid... Anyone else 
 have a similar
  problem?
 
  Thanks in advance,
  Adam
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com
 
 



RE: TC 4.0.1 - Catalina.start: LifecycleException

2001-10-24 Thread Joel P. Worrall

I believe you'll find that the BindException is occurring because Tomcat has
not totally shutdown.  On startup, it grabs the 2 server ports you specify
in the server.xml.  

It appears that 4.0.1 uses threads to go out and kill those server ports on
shutdown.  My experience has been that it takes between 2 seconds or more to
reliably assume those ports are now open again.  

If that is not the case, use netstat on the server and determine what is
using that port(s).  Perhaps there's another copy of tomcat running on those
ports (especially if you're using the default install).

-Original Message-
From: Andrew Bruno [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 7:28 PM
To: Tomcat-User (E-mail)
Subject: TC 4.0.1 - Catalina.start: LifecycleException


Hello tomcat-users,

I am receiving this problem on a Windows 2000 Server SP2, which is
trying to execute TOMCAT 4.0.1, using JDK 1.3.1_01 on port 8080.  Port
80 is used for IIS.

Any ideas what it could be related to?

Catalina.start: LifecycleException:  null.open:  java.net.BindException:
Address in use: JVM_Bind
LifecycleException:  null.open:  java.net.BindException: Address in use:
JVM_Bind
at
org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnecto
r.java:1116)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:454)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:5
52)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
- Root Cause -
java.net.BindException: Address in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.init(Unknown Source)
at java.net.ServerSocket.init(Unknown Source)
at
org.apache.catalina.net.DefaultServerSocketFactory.createSocket(DefaultS
erverSocketFactory.java:118)
at
org.apache.catalina.connector.http.HttpConnector.open(HttpConnector.java
:946)
at
org.apache.catalina.connector.http.HttpConnector.initialize(HttpConnecto
r.java:1114)
at
org.apache.catalina.core.StandardService.initialize(StandardService.java
:454)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:5
52)
at org.apache.catalina.startup.Catalina.start(Catalina.java:775)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

 winmail.dat


RE: sourcepath problem in building tomcat

2001-10-24 Thread Larry Isaacs

I don't use JDK1.2.1, so I don't know much of the
details about it.  However, the help message:

[-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
path][-nowrite][-deprecation][-d dir][-Jruntime
flag] file.java...

is very 1.1.8-like and doesn't support the -sourcepath
argument.  I would guess that Ant is thinking the JDK is
Java2 and assumes the javac supports the -sourcepath
argument.  Maybe this isn't a correct assumption for
JDK 1.2.1.

I would highly recommend upgrading your JDK.  I think
there are other problems in store if you continue using
it.  If you upgrade, I think your compile problem would
disappear.

Cheers,
Larry

 -Original Message-
 From: Bill Cai [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 1:01 AM
 To: [EMAIL PROTECTED]
 Cc: Bill Cai
 Subject: Re: sourcepath problem in building tomcat
 
 
 It is jdk 1.2.1:
 
 java version 1.2.1
 Solaris VM (build Solaris_JDK_1.2.1_04, native
 threads, sunwjit)
 
 Thanks,
 
 Bill
 
 --- Bill Cai [EMAIL PROTECTED] wrote:
  I thought that I was using at least jdk1.2. But I
  willl check tonight because I have multiple jdks
  installed.
  
  Thanks,
  
  Bill
  
   From: Larry Isaacs 
Subject:  RE: sourcepath problem in building
   tomcat
Date:  Tue, 23 Oct 2001 12:51:51 -0400
   
It appears that the javac being executed is
  coming
   from
JDK 1.1.8.  Is JDK1.1.8 what you want to be
  using,
or is an old javac being picked up by mistake? 
  If
JDK 1.1.8 is correct, I would like to see the
  log
for the detect: through init: targets.
   
Larry
   
   --- Bill Cai [EMAIL PROTECTED] wrote:
I always got the following error when building
tomcat
by using ant. I tried ant 1.1 1.2 1.4. Any idea?

tomcat_util:
[javac] Compiling 91 source files to
   
  
 
 /usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build/tomcat/classes
[javac] javac: invalid flag: -sourcepath
[javac] use: javac
   
  
 
 [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath
path][-nowrite][-deprecation][-d dir][-Jruntime
flag] file.java...

BUILD FAILED

   
  
 
 /usr/local/jakarta/jakarta-tomcat-3.3-dev-src/build.xml:206:
Compile failed, messages should have been
   provided.


   
  __
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
   
   
   __
   Do You Yahoo!?
   Make a great connection at Yahoo! Personals.
   http://personals.yahoo.com
   
  
  
  __
  Do You Yahoo!?
  Make a great connection at Yahoo! Personals.
  http://personals.yahoo.com
 
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com
 



RE: How to put getRemoteAddr() into SQL server table in Tomcat 4.0 ?

2001-10-24 Thread Shah, Chintan V (Chintan)

do it like this...it should work...

-



if (rs.next())

String updateip =Update tbluser set incomingip= ' +
request.getRemoteAddr() + ' where uname =' + uname + ';
---

Note the positions of apostrophe and double quotes... around
request.getRemoteAddr()

regards,
Chintan

-Original Message-
From: Miao, Franco CAWS:EX [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 10:48 AM
To: '[EMAIL PROTECTED]'
Subject: How to put getRemoteAddr() into SQL server table in Tomcat 4.0
?


Source code:

-



if (rs.next())

String updateip =Update tbluser set incomingip= 'request.getRemoteAddr()'
where uname =' + uname + ';

---

No erro come up, but it didn't put remote Ip address into SQL server's
table, value is null, if I change to   '+request.getRemoteAddr()+'  ,
you will see
'+request.getRemoteAddr()+' as the value in SQL table.

Don't know why, looks like request.getRemoteAddr() doesn't function in SQL
statement. Pls advise, thanks!


Franco



Looking for informations Apache/EAPI

2001-10-24 Thread Jean-Luc BEAUDET

Hi All,

I looking for informations to compile Apache so that it includes support
for EAPI.

Any help welcome.

Regards

Jean-Luc ;O






Memory settings problem

2001-10-24 Thread Hornsby Peter

In order to start Java with increased memory settings, which of the
following is correct in tomcat.bat - 

set _STARTJAVA=start %JAVA_HOME%\bin\java -Xms64m -Xsx120m
set _RUNJAVA=%JAVA_HOME%\bin\java -Xms64m -Xsx120m

I'm using tomcat 3.3

Thanks,
Pete


-- 
The Information contained in this E-Mail and any subsequent correspondence
is private and is intended solely for the intended recipient(s).
For those other than the recipient any disclosure, copying, distribution, 
or any action taken or omitted to be taken in reliance on such information is
prohibited and may be unlawful.



RE: Tomcat 4.0.1 Final and Xerces Parser

2001-10-24 Thread Rida Ligurs



OK, it ends up that I was encountering the problem because of the order in
which jars in my webapps\lib directory are places in the classpath!   In
Tomcat 3.2 we were setting the classpath order.

Will we always have to rename or jars just to get them to load in the right
order?  This seems like a terrible work around.

 




-Original Message-
From: Rida Ligurs 
Sent: Tuesday, October 23, 2001 12:43 PM
To: Tomcat-User (E-mail)
Subject: Tomcat 4.0.1 Final and Xerces Parser 


Hi there,

I just upgraded to Tomcat 4.0.1 Final and I am getting a NoSuchMethod
exception when my servlet attempts to use xerces. 

The servlet was originally running with Tomcat 3.2.1 and it used xerces.jar
1.3.0 that was in my webapps WEB-INF\lib directory.

Now I've copied my whole webapps directory to Tomcat 4.0 (including xerces
1.3.0) and I'm getting a NoSuchMethod exception when my servlet attempts to
use the DOM.

It looks like the class loader isn't using the xerces in my WEB-INF
directory, it's picking up something that isn't a DOM Level 2
implementation.

Any idea what's going on here?

TIA,


Rida




Please explain this Tomcat problem to me.

2001-10-24 Thread Kemp Randy-W18971

I have this unusual quirk with Tomcat, and maybe someone out there can
explain what is happening.
1.  I have Apache 1.3.19 and Tomcat 4.01 on Solaris 5.6, with Sun JDK 1.3.1.
2.  I start and stop Tomcat 4.01 with startup.sh and shutdown.sh.
3.  After this, I bring up http://my.domain.name:8080, and I see Tomcat 4.01
screen.
4.  I shut down Tomcat, and bring up the Jboss/Tomcat 3.23 bundle.  If I
type http://my.domain.name:8080, I see the Tomat 3.23 screen.
5.  I shut down Jboss/tomcat and type http://my.domain.name:8080, and I get
can't connect to server or some such message.
6.  I bring up Tomcat 4.01 with startup.sh, and instead of a Tomcat 4.01
screen, I get a Tomcat 3.23 screen.

What could be causing the scenario in item 6, and is there a way to correct
it without rebooting the machine?



Re: how to add context element to conf/server.xml file

2001-10-24 Thread carlos . chaparro


the path argument in the context is the path in the url... you must type
path=/exp not d:\exp...

Carlos Chaparro
Taller Web, Equant
Tel:  6211072
[EMAIL PROTECTED]




Why can't I connect

2001-10-24 Thread Kemp Randy-W18971

Can someone explain why I can't connect in Windows 2000 with Tomcat 4.01 and
Apache 1.3.22?
1.  I am using all binaries, and I put mod_webapp.so and libapp.dll in
Apache directory Modules.
2.  I put this entry in Tomcat server.xml after the EJB entry 
Context path=/onjava docBase=onjava debug=0 reloadable=true /
3.  I put this in Apache httpd.conf at the end
VirtualHost *
   ServerName localhost
   WebAppConnection conn warp localhost:8080
   WebAppDeploy examples conn /examples/
   WebAppDeploy onjava conn /onjava/
   WebAppInfo /webapp-info
 /VirtualHost
4.  I put my war file in the tomcat webapps directory.
5.  I can bring up localhost and localhost:8080 OK.
6.  If I type localhost/onjava/, the following entry is in the Apache error
logs: (both Apache and Tomcat are started)

Fri Oct 19 12:41:00 2001] [error] [client 127.0.0.1] File does not exist:
c:/program files/apache group/apache/htdocs/onjava
[Fri Oct 19 12:41:44 2001] [error] Connection conn cannot connect
[Fri Oct 19 12:41:44 2001] [error] Cannot open connection conn
[Fri Oct 19 15:21:00 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:22:08 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:22:21 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
[Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples

What could I be missing? 





tomcat session issue

2001-10-24 Thread Rinku Randhawa

Hi there,

I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
that session tracking, when more than one browser window is opened at one
time, doesn't come out to be correct. I am using its inbuilt session object
and the cookies are enabled in my browser. When more than one sessions are
running then the page presented is unpredictable.Sometimes correct page
displays and sometimes totally diferent page gets displayed. It works great
except if I have 2 browsers sessions up - then it gets confused and losses
track of which is the current session.

Are there any issues with the Tomcat server regarding session tracking?

Thanks in advance,
-Rinku




Why I can't connect - part 2

2001-10-24 Thread Kemp Randy-W18971

Can someone explain why I can't connect in Windows 2000 with Tomcat 4.01 and
Apache 1.3.22?
1.  I am using all binaries, and I put mod_webapp.so and libapp.dll in
Apache directory Modules.
2.  I put this entry in Tomcat server.xml after the EJB entry 
Context path=/onjava docBase=onjava debug=0 reloadable=true /
3.  I put this in Apache httpd.conf at the end
VirtualHost *
   ServerName localhost
   WebAppConnection conn warp localhost:8080
   WebAppDeploy examples conn /examples/
   WebAppDeploy onjava conn /onjava/
   WebAppInfo /webapp-info
 /VirtualHost
Added following after commented out loadmods
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
4.  I put my war file in the tomcat webapps directory.
5.  I can bring up localhost and localhost:8080 OK.
6.  If I type localhost/onjava/, the following entry is in the Apache error
logs: (both Apache and Tomcat are started)

Fri Oct 19 12:41:00 2001] [error] [client 127.0.0.1] File does not exist:
c:/program files/apache group/apache/htdocs/onjava
[Fri Oct 19 12:41:44 2001] [error] Connection conn cannot connect
[Fri Oct 19 12:41:44 2001] [error] Cannot open connection conn
[Fri Oct 19 15:21:00 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:22:08 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:22:21 2001] [error] Web-application not yet deployed
[Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples
[Fri Oct 19 15:24:42 2001] [error] Cannot deploy application examples

What could I be missing? 





RE: Questions on tomcat heap usage and garbage collection (avoiding O utOfMemoryError exceptions)

2001-10-24 Thread Randy Layman


I think the best thing you can do is to determine where the memory
is going and fix your leaks.  I say your leaks because in my experience,
Tomcat doesn't leak memory and doesn't take a lot of memory for each
connection.

Randy

 -Original Message-
 From: Bang, Steinar [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 3:21 AM
 To: '[EMAIL PROTECTED]'
 Subject: Questions on tomcat heap usage and garbage 
 collection (avoiding
 O utOfMemoryError exceptions)
 
 
 Platform: Intel PIII 797.499MHz, 256MB RAM
   Debian Woody GNU/Linux,
   kernel 2.2.19
   Blackdown J2SDK 1.3.1
   apache 1.3.19
   tomcat 3.2.3
 
 When using httperf[1] to stresstest JSPs on the above 
 platform, I'm running into the OutOfMemoryError 
 exception problem:
   http://www.jguru.com/faq/view.jsp?EID=64889
 
 The solution suggested in the URL above, is to increase
 the heap size, but this is just pushing the problem
 ahead.  The important thing for us, is that tomcat doesn't die.
 
 If this is a problem for high load sites, JSP technology
 would be unusable, and obviously it isn't.  So what
 do others do?
 
 Possible alternatives:
  1. increase the heap size to something astronomical,
 and just hope for the best? 
  2. tune apache/tomcat to restart more often, so that
 the max heap size aren't reached before the tomcat
 processes are restarted?
  3. catch the exception?
  4. use some kind of watchdog to restart tomcat?
 
 Question 3 raises more questions:
  3a. What do you do when you catch the exception?
  There isn't much you _can_ do if you don't have
  any memory left.  Maybe force a garbage collection
  and then re-run the request?
  3b. Why do all the tomcat processes connected to
  apache processes die, if one of them gets an
  OutOfMemoryError exception
 
 Which brings us to question 2: tuning apache/tomcat:
 When reading the documentation, I thought that there
 was supposed to be a single tomcat process, serving
 all requests.  However top reports a lot of tomcat
 processes, when I'm stresstesting the server, which
 leads me to belive that there is a separate tomcat
 process for each apache server process running.
 Is this correct?
 
 In any case; based on this assumption, I reduced
 the number of currently running apache processes
 from the default 150 to 20, with dramatically
 changed behaviour: instead of running with a 20%
 load, the machine was running at an 80%-90% load
 with less physical memory used (restarting processes
 is a lot of work).
 
 However, even with the high load, the end result
 was a lot more stable.  Watching the tomcat processes
 in top, I could watch them grow up to around 82MB,
 before there suddenly was a lot of processes with
 around 19MB.
 
 It wasn't completely stable though.  I set up
 httperf to do 1 million requests, before I left
 last night, and it only got to 51927 before tomcat
 died.
 
 I run httperf from a different machine (PIII 800MHz),
 using the command:
   httperf --server=no-video2 --port=80 --uri=/tps-sba/Welcome.jsp
 --rate 150 --num-conns=100 --num-calls=1
 (--num-conns varies.  I have mostly been using 
 1).
 
 
 The memory usage observed in top, also raises some
 questions related to my question 1:
  1a. Why does tomcat processes always start at around
  19MB, no matter what I've set the initial heap
  size to be?
  1b. Why does the initial heap size seem to matter
  for my stability if the processes always start
  at 19MB?  Is it all in my head?
 
 I'm interested in all direct experiences, ideas,
 guesses, answers, etc.
 
 Thanx!
 
 
 - Steinar
 
 
 [1] http://freshmeat.net/projects/httperf
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 This email, its content and any attachments is PRIVATE AND 
 CONFIDENTIAL to
 TANDBERG Television. If received in error please notify the sender and
 destroy the original message and attachments.
 



Re: Multiple web.xml files?

2001-10-24 Thread Frank Lawlor

That would be nice.

In my app, when I add a Client I need to add a set of 
security constraints, mappings, etc.  It would make 
maintenance MUCH easier if these could be modularized.
This would also require more flexibility in the organization
of the web.xml file.

Ideally this functionality should have been a set of APIs
which could be invoked programmatically (e.g.
addSecurityConstraint()) so this could be done more
dynamically without having to bounce the app to read
a rigidly structured xml file.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






apache 1.3 and tomcat 4.0...

2001-10-24 Thread carlos . chaparro

i can't setup apache 1.3 to work with tomcat 4... in my windows2000 machine
i already download de mod_webapp.dll

i configured the following context:

Context name=esdegue path=/esdegue docBase
=../CarlosChaparro/Proyectos/E-Learning debug=9 reload=true/

and i added the next lines to my apache httpd.conf..

LoadModule webapp_module libexec/mod_webapp.dll
WebAppConnection warpConnection warp cchaparro:8008
WebAppDeploy esdegue warpConnection /esdegue/

where cchaparro is my apache servername

but when i restart both servers and call the next url

http://cchaparro/esdegue/

i got the next error

WebApp: 500 Error (File: C:
   \Java\Jakarta\jakarta-tomcat-4.0\connectors\lib\pr_warp.c Line: 679)


We are disconnected

my request and my headers...

Application not deployed correctly
my request and my headers...

I/O Error
my request and my headers...




thanks a lot..

Carlos Chaparro
Taller Web, Equant
Tel:  6211072
[EMAIL PROTECTED]




Servlet Mapping -- Servlet getting called twice

2001-10-24 Thread Smith, Lawrence T (Lance)

Please HELP:
I have the following in my web.xml file:
servlet-mapping
  servlet-nameCardServlet/servlet-name
  url-pattern/Cards/*/url-pattern
/servlet-mapping

The servlet at this point only writes out a simple hello page and debug
output of getPathInfo() and getRequestURI() but it will do some pretty heavy
processing which I don't want done twice. What is happening is as follows:

I submit the URL: 
/foo/Cards/a/b/aCard.jsp
The servlet debug prints:
pathInfo=/a/b/aCard.jsp
requestURI=/foo/Cards/a/b/aCard.jsp
pathInfo=/a/b/
requestURI=/foo/Cards/a/b/

I submit the URL: 
/foo/Cards/aCard.jsp
The servlet debug prints:
pathInfo=/aCard.jsp
requestURI=/foo/Cards/aCard.jsp
pathInfo=/
requestURI=/foo/Cards/

What I thought should happen is that I would only get called once as I do
not have any further calls that reference '/Cards/' once I am in the
servlet. Is what I am seeing the proper behavior or am I doing something
wrong? Help. The first time the servlet gets called with what I would expect
the second call is really throwing me for a loop.
Thanks for any help given.




Re: URGENT, Tomcat MySQL problems

2001-10-24 Thread carlos . chaparro


why don't you try to put the .jar in the lib directory in the tomcat
home  tomcat-home/lib...
and restart tomcat...


Carlos Chaparro
Taller Web, Equant
Tel:  6211072
[EMAIL PROTECTED]




Re: Tomcat 4.0.1 Final and Xerces Parser

2001-10-24 Thread Frank Lawlor

I don't know what the right answer is, but I got my app to
pick up the xerces parser by putting it in the jre lib\ext
directory (e.g. F:\jdk1.3.1\jre\lib\ext).

You might also try the tomcat common\lib.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






AW: Questions on tomcat heap usage and garbage collection (avoiding OutOfMemoryError exceptions)

2001-10-24 Thread Ralph Einfeldt

Some answers:

- AFAIK the only 'memory leak' in tomcat is, that every JSP class stays
in memory
  after it is loaded.
- Find out or guess the amount of memory you need to hold all your
classes
- Find out or guess the amount of memory you need to all session data
for all 
  concurrent sessions.
  Keep in mind that the session will be alive for some time (default: 30
minutes 
  after the last action in the action). This can be a reason for tomcat
to bail 
  out, if you use the wrong tool to do the stress test, where each
request 
  creates a new session (given a load of 10 requests per second you can
have up 
  to some 20.000 concurrent sessions).
  (Tomcat needs some memory for each session too)
- The default setting can be to low if you have many JSP's and/or data
in sessions
- Try to find out if any of your software or any library that you use
has memory leaks
- If an OutOfMemoryError happens, all 'processes' of the vm die, because
  what you see are not processes, but threads that share the same
memory.

 -Ursprüngliche Nachricht-
 Von: Bang, Steinar [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 24. Oktober 2001 09:21
 An: '[EMAIL PROTECTED]'
 Betreff: Questions on tomcat heap usage and garbage 
 collection (avoiding
 OutOfMemoryError exceptions)
 
 
 Platform: Intel PIII 797.499MHz, 256MB RAM
   Debian Woody GNU/Linux,
   kernel 2.2.19
   Blackdown J2SDK 1.3.1
   apache 1.3.19
   tomcat 3.2.3
 
 When using httperf[1] to stresstest JSPs on the above 
 platform, I'm running into the OutOfMemoryError 
 exception problem:
   http://www.jguru.com/faq/view.jsp?EID=64889
 
 The solution suggested in the URL above, is to increase
 the heap size, but this is just pushing the problem
 ahead.  The important thing for us, is that tomcat doesn't die.
 
 If this is a problem for high load sites, JSP technology
 would be unusable, and obviously it isn't.  So what
 do others do?
 
 Possible alternatives:
  1. increase the heap size to something astronomical,
 and just hope for the best? 
  2. tune apache/tomcat to restart more often, so that
 the max heap size aren't reached before the tomcat
 processes are restarted?
  3. catch the exception?
  4. use some kind of watchdog to restart tomcat?
 
 Question 3 raises more questions:
  3a. What do you do when you catch the exception?
  There isn't much you _can_ do if you don't have
  any memory left.  Maybe force a garbage collection
  and then re-run the request?
  3b. Why do all the tomcat processes connected to
  apache processes die, if one of them gets an
  OutOfMemoryError exception
 
 Which brings us to question 2: tuning apache/tomcat:
 When reading the documentation, I thought that there
 was supposed to be a single tomcat process, serving
 all requests.  However top reports a lot of tomcat
 processes, when I'm stresstesting the server, which
 leads me to belive that there is a separate tomcat
 process for each apache server process running.
 Is this correct?
 
 In any case; based on this assumption, I reduced
 the number of currently running apache processes
 from the default 150 to 20, with dramatically
 changed behaviour: instead of running with a 20%
 load, the machine was running at an 80%-90% load
 with less physical memory used (restarting processes
 is a lot of work).
 
 However, even with the high load, the end result
 was a lot more stable.  Watching the tomcat processes
 in top, I could watch them grow up to around 82MB,
 before there suddenly was a lot of processes with
 around 19MB.
 
 It wasn't completely stable though.  I set up
 httperf to do 1 million requests, before I left
 last night, and it only got to 51927 before tomcat
 died.
 
 I run httperf from a different machine (PIII 800MHz),
 using the command:
   httperf --server=no-video2 --port=80 --uri=/tps-sba/Welcome.jsp
 --rate 150 --num-conns=100 --num-calls=1
 (--num-conns varies.  I have mostly been using 
 1).
 
 
 The memory usage observed in top, also raises some
 questions related to my question 1:
  1a. Why does tomcat processes always start at around
  19MB, no matter what I've set the initial heap
  size to be?
  1b. Why does the initial heap size seem to matter
  for my stability if the processes always start
  at 19MB?  Is it all in my head?
 
 I'm interested in all direct experiences, ideas,
 guesses, answers, etc.
 
 Thanx!
 
 
 - Steinar
 
 
 [1] http://freshmeat.net/projects/httperf
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 This email, its content and any attachments is PRIVATE AND 
 CONFIDENTIAL to
 TANDBERG Television. If received in error please notify the sender and
 destroy the original message and attachments.
 
 



JNDI doesn't work

2001-10-24 Thread Jaime Garcia Bonis

Hi everyone;


I need help! i´m trying to set up my Tomcat 4..0.1 in such a way
than I can use a DataSource in my aplicaction called FtcApp.
My piece of server.xml regard this is:

Context path=/FtcApp docBase=FtcApp debug=0
 reloadable=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_FtcApp_log. suffix=.txt
   timestamp=true/
   Parameter name=context.param.name
value=context.param.value
 override=false/
  Resource name=jdbc/FtcAppDb auth=CONTAINER
type=javax.sql.DataSource/
  ResourceParams name=jdbc/FtcAppDb
parameternameuser/namevaluescott/value/parameter


parameternamepassword/namevaluetiger/value/parameter
parameternamedriverClassName/name
  valueoracle.jdbc.driver.OracleDriver/value/parameter

parameternamedriverName/name

valuejdbc:oracle:thin:@zagarron:1521:orcl/value/parameter
  /ResourceParams

/Context

My web.xml is like this:

 resource-ref
  res-ref-namejdbc/FtpAppDb/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

And my java code that i want it use this datasource is :

 Context ctx = null;
   DataSource cpds = null;
   //PooledConnection pool = null;
   try {
   ctx = new InitialContext();
cpds = (DataSource)ctx.lookup(/jdbc/FtcAppDb);
   } catch (NamingException e) {
   throw new JspException(e);
   }

And when i trying this i get the following error:

javax.servlet.jsp.JspException: Error:IOException mientras se insertaba
en tablajavax.servlet.jsp.JspException: El nombre jdbc no este asociado
a este contexto
 at tags.Insertar.doStartTag(Insertar.java:116)
 at
org.apache.jsp.edificios_0005fadd_0005f2$jsp._jspService(edificios_0005fadd_0005f2$jsp.java:132)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)

 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)

 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

 at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

 at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)

 at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)

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


Does anyone can help me ???

Thanks









Re: Help ... Weird Problem

2001-10-24 Thread A.L.

Ignore my question... I have reinstalled the jdk and
everything is fine.

-Amos
--- A.L. [EMAIL PROTECTED] wrote:
 Everything has been working fin ewith Tomcat until
 all
 of a sudden certain web apps stopped working.   I
 have
 no idea what could have happened.  I tried to
 reinstall Tomcat, and when I do so, all the admin
 web
 apps work fine, but ones that I have created that
 were
 working before no longer work.  I'm worried that
 perhaps someone has hacked into my computer.
 
 The problem I get now is that when I try to view a
 page on the localhost: the browser continues to try
 to
 load the page, but is unable to.  What I am
 wondering
 is if it is possible that the jvm I downloaded from
 sun could become corrupt.  What wlse could cause
 such
 a weird problem.
 
 -Thanks
 
 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com


__
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



**** File Download - CSV question ****

2001-10-24 Thread Evan Swanson

I wrote an application that for Tomcat 3.2 running on window. In the HTML
the is a reference ( A HREF=/filname.csv ) to the filename. 
When I run this on windows I get a popup save as selection box. 
When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
but instead displays the data on the screen.

Is this a difference between TC32 adn TC40 or Unix / Windows.
Is this configurable.


Thanks in advance.




Manager App Bug

2001-10-24 Thread Frank Lawlor

On occasion I have need from my app to update the
web.xml and cause the app to get restarted.  I tried
to do this using the manager application and found
that whenever the reload command is issued from a
servlet in the target app (the one to be reloaded) it
causes the manager and target apps to hang:

2001-10-22 16:32:34 StandardWrapper[/AGCW:Manager]: Loading
container servlet Manager
2001-10-22 16:32:34 Manager: init
2001-10-22 16:32:34 Manager: init: Associated with Deployer
'localhost'
2001-10-22 16:32:34 Manager: restart: Reloading web application at
'/AGCW'
2001-10-22 16:32:34 StandardContext[/AGCW]: Reloading this Context
has started
2001-10-22 16:32:34 StandardWrapper[/AGCW:Manager]: Waiting for 1
instance(s) to be deallocated

the last entry indicates the hanging servlet.

If I issue the command from somewhere other than the target app,
it completes normally:

2001-10-23 17:29:09 StandardWrapper[/manager:Manager]: Loading
container servlet Manager
2001-10-23 17:29:09 Manager: init
2001-10-23 17:29:09 Manager: init: Associated with Deployer
'localhost'
2001-10-23 17:29:09 Manager: restart: Reloading web application at
'/AGCW'
2001-10-23 17:29:09 StandardContext[/AGCW]: Reloading this Context
has started
2001-10-23 17:29:09 AutowebControl: destroy
2001-10-23 17:29:09 DBCheck: destroy
2001-10-23 17:29:09 AutowebLogonControl: destroy
2001-10-23 17:29:09 WebappLoader[/AGCW]: Deploying class
repositories to work directory C:\Cat_Test\work\localhost\AGCW
2001-10-23 17:29:09 StandardManager[/AGCW]: Seeding random number
generator class java.security.SecureRandom
2001-10-23 17:29:09 StandardManager[/AGCW]: Seeding of random number
generator has been completed
2001-10-23 17:29:09 StandardWrapper[/AGCW:default]: Loading
container servlet default
2001-10-23 17:29:09 default: init
2001-10-23 17:29:09 StandardWrapper[/AGCW:invoker]: Loading
container servlet invoker
2001-10-23 17:29:09 invoker: init
2001-10-23 17:29:09 StandardWrapper[/AGCW:jsp]: Using Jasper
classloader for servlet jsp
2001-10-23 17:29:10 jsp: init
2001-10-23 17:29:11 StandardContext[/AGCW]: Reloading this Context
is completed

Allowing an app to restart itself seems like an important use of this
function.
I'd call this a bug.

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.






tomcat 4.0: Plug in custom Realm

2001-10-24 Thread Maneesha Jain

Hi,

I want to plug in a custom Realm class in server.xml in tomcat 4.0 ?

Is that possible ?

Can I need to implement the Realm interface and stick that in the
server.xml file?

Where should I put this class, so the tomcat can resolve it when parsing
server.xml ?

Is this procedure documented anywhere ?

Regards
Maneesha




Re: mod_webapp and datasource failure

2001-10-24 Thread Pier Fumagalli

Brett Porter at [EMAIL PROTECTED] wrote:

 Hi,
 
 I have looked into the mail archives and seen others with the same
 problem: when using WARP, datasources don't work as they get deployed as
 null. The solutions mentioned were:
 1) set ServerName to an IP address and the same in both that and
 server.xml - didn't work, tried various combinations
 2) use nightly builds of mod_webapp - doesn't compile with a stock
 tomcat 4.0.1 ditribution when it gets to warp.jar.
 
 It certainly seems to be attempting to deploy the webapp twice - it logs
 the first time successfully in localhost_log_..., and fails when you
 start apache and it logs that to cataline_log_... using the loggers from
 the example server.xml.
 
 Is there any solution to this, other than using a snapshot build of tomcat?
 Is my best alternative to use a snapshot, the release AJP connector
 (haven't tried it), or try and tunnel requests to a HTTP connector?

Can I see your server.xml configuration file?

Pier




Re: servlet upload

2001-10-24 Thread Pier Fumagalli

E B at [EMAIL PROTECTED] wrote:

 In my webapp under tomcat, I am using oreilly's
 cos.jar for uploading files. I observe that
 repeated uploading of same file fails. ie., when
 I upload a file for second time(different content,
 same file name), in my servlet I am getting the
 old file only. It is probably due to caching,
 does anybody know how do disable this caching ?
 
 the files are jar files. does jvm cache them ?
 or tomcat ? I see some jar cache files in the temp.
 The class used to access the uploaded file is
 com.oreilly.servlet.MultipartRequest

Nope, but AFAICS, those servlets use a file system path, not a path relative
to the web-application temporary path to store the uploaded files... Did you
try changing the upload directory parameter to be different for the two
web-applications?

Pier




Automatic Application Deployment

2001-10-24 Thread Brad . Moreland

Hi!
I am attempting to Auto Deploy a war (clmtest.war in this case) file.  I put
it in the appBase ($CATALINA_HOME/webapps) and it expands automatically as
expected when I restart tomcat.  My problem is that I cannot access my pages
from a browser.  I continue to get the standard 404 error that The
requested resource (/clmtest/) is not available. .  If I add a context
manually to my server.xml file it works fine.  I am under the impression
according to the documentation that I should not have to manually add a
context.  
I'm using Solaris 8 and Tomcat 4.0.1
Help!?
Thanks in advance!!
Brad Moreland

+++The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and destroy any copies of this
document.+++



Re: getNamedDispatcher

2001-10-24 Thread Craig R. McClanahan

Doing this trick with servlet mappings is pretty much doomed to failure,
as you have discovered, because servlet mappings are applied to the
lookups of request dispatchers as well.

I suggest you look at using Filters (from the servlet 2.3 API) instead.
For instance, you can have a Filter that is mapped to /* (and therefore
sees every single request), without disrupting what servlets are mapped to
the various paths.  In the Filter, you can make the choice to just pass
the request on, or use a request dispatcher to redirect it somewhere else.

Craig


On 24 Oct 2001, Dr. Evil wrote:

 Date: 24 Oct 2001 05:04:45 -
 From: Dr. Evil [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: getNamedDispatcher


 Hi, I am trying to use ServletContext.getNamedDispatcher(String) to get
 a RequestDispatcher object in my servlet.  The goal of this is to
 allow my controller servlet to hand off request processing to another
 servlet.  What I have done is set up a default servlet-mapping in my
 web.xml file, so that all requests going to the server will be handled
 initially by a controller servlet, which will then decide which
 servlet should really handle the request.  It will go through its
 logic and then come up with a string, which will be the real servlet
 which will handle the request.

 I'm trying to use getNamedDispatcher so that I can avoid the loop that
 would happen because of the default servlet-mapping.  This seems like
 it should work.

 In my servlet's init method, I do this:

this.context = getServletConfig().getServletContext();

 This works.  context is not null after this call, so it definitely
 gets a context.

 However, later when I do:

RequestDispatcher rd =
this.context.getNamedDispatcher(/static/index.html);

 rd comes back as null, and obviously rd.forward(request, response) is
 impossible.

 Any sugestions on this?  How do I get a servlet to send something to a
 named servlet without going through the servlet-mappings again?

 Thanks





Re: WARP plugin status at 4.0.1 - README on server

2001-10-24 Thread Pier Fumagalli

Brett Porter at [EMAIL PROTECTED] wrote:

 Hi,
 
 Looking at the README on the server where I downloaded the WARP plugin
 yesterday, it said there were issues about starting/stopping tomcat and
 apache recognising this, that would be corrected in the final release.
 I'm assuming this is the 4.0 final release, so I'm wondering what the
 status is.

It's not the final release. 4.0 is the final release for the servlet
container, but not for the web-server connector. There are several issues
related to the redeployment of web-applications while Apache is running, and
no clear solution ahead unless we don't change the whole deployment
mechanism (thing I'm actually experimenting right now).

I'll let you know how that works out. Right now, when you restart tomcat,
you also HAVE to restart apache.

Pier




Re: Questions on tomcat heap usage and garbage collection (avoidingO utOfMemoryError exceptions)

2001-10-24 Thread Craig R. McClanahan

The most important task in a situation like this is to find out why memory
is being consumed in the first place.  Generally, this is caused by one of
the following types of factors:

* Creating lots and lots of session attributes in your
  applications (which causes the objects to stay allocated
  until the session times out or is invalidated)

* Creating a new session on every request from your
  stress test tool, which causes a new session object
  to be created each time.

The latter case is pretty insidious for doing stress testings, because JSP
pages are session-aware by default (unless you tell them not to).  This
behavior is not typical of real users, howevever, because they will be
returning the same session id (and therefore accessing the same session)
throughout their interaction with the server.

You should investigate whether httperf (or other tool) can let you
remember the session id that was assigned in the first place and then
reuse it on the subsequent requests, and/or whether your test JSP page can
temporarily be set to not use sessions so that this doesn't happen.

Craig


On Wed, 24 Oct 2001, Bang, Steinar wrote:

 Date: Wed, 24 Oct 2001 09:21:19 +0200
 From: Bang, Steinar [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
 Subject: Questions on tomcat heap usage and garbage collection (avoiding
 O utOfMemoryError exceptions)

 Platform: Intel PIII 797.499MHz, 256MB RAM
   Debian Woody GNU/Linux,
   kernel 2.2.19
   Blackdown J2SDK 1.3.1
   apache 1.3.19
   tomcat 3.2.3

 When using httperf[1] to stresstest JSPs on the above
 platform, I'm running into the OutOfMemoryError
 exception problem:
   http://www.jguru.com/faq/view.jsp?EID=64889

 The solution suggested in the URL above, is to increase
 the heap size, but this is just pushing the problem
 ahead.  The important thing for us, is that tomcat doesn't die.

 If this is a problem for high load sites, JSP technology
 would be unusable, and obviously it isn't.  So what
 do others do?

 Possible alternatives:
  1. increase the heap size to something astronomical,
 and just hope for the best?
  2. tune apache/tomcat to restart more often, so that
 the max heap size aren't reached before the tomcat
 processes are restarted?
  3. catch the exception?
  4. use some kind of watchdog to restart tomcat?

 Question 3 raises more questions:
  3a. What do you do when you catch the exception?
  There isn't much you _can_ do if you don't have
  any memory left.  Maybe force a garbage collection
  and then re-run the request?
  3b. Why do all the tomcat processes connected to
  apache processes die, if one of them gets an
  OutOfMemoryError exception

 Which brings us to question 2: tuning apache/tomcat:
 When reading the documentation, I thought that there
 was supposed to be a single tomcat process, serving
 all requests.  However top reports a lot of tomcat
 processes, when I'm stresstesting the server, which
 leads me to belive that there is a separate tomcat
 process for each apache server process running.
 Is this correct?

 In any case; based on this assumption, I reduced
 the number of currently running apache processes
 from the default 150 to 20, with dramatically
 changed behaviour: instead of running with a 20%
 load, the machine was running at an 80%-90% load
 with less physical memory used (restarting processes
 is a lot of work).

 However, even with the high load, the end result
 was a lot more stable.  Watching the tomcat processes
 in top, I could watch them grow up to around 82MB,
 before there suddenly was a lot of processes with
 around 19MB.

 It wasn't completely stable though.  I set up
 httperf to do 1 million requests, before I left
 last night, and it only got to 51927 before tomcat
 died.

 I run httperf from a different machine (PIII 800MHz),
 using the command:
   httperf --server=no-video2 --port=80 --uri=/tps-sba/Welcome.jsp
 --rate 150 --num-conns=100 --num-calls=1
 (--num-conns varies.  I have mostly been using
 1).


 The memory usage observed in top, also raises some
 questions related to my question 1:
  1a. Why does tomcat processes always start at around
  19MB, no matter what I've set the initial heap
  size to be?
  1b. Why does the initial heap size seem to matter
  for my stability if the processes always start
  at 19MB?  Is it all in my head?

 I'm interested in all direct experiences, ideas,
 guesses, answers, etc.

 Thanx!


 - Steinar


 [1] http://freshmeat.net/projects/httperf




















 This email, its content and any attachments is PRIVATE AND CONFIDENTIAL to
 TANDBERG Television. If received in error please notify the sender and
 destroy the original message and attachments.





Re: servlets path in tomcat 3.3

2001-10-24 Thread mathieu

That's fine for a couple of servlets, but I have more than 6500 servlets, I 
can't map them all by hand.
In Tomcat 3.2, the RequestInvoker had a prefix argument which could be used 
to redirect matching paths to servlets

RequestInterceptor
className=org.apache.tomcat.request.InvokerInterceptor
debug=0 prefix=/servlet/ /

With prefix=/, I could forward any request to servlets without using 
/servlet/ in the url.
Where is the RequestInterceptor gone?

 Add a servlet-mapping to your web.xml file.

 servlet-mapping
   servlet-name
 SnoopServlet
   /servlet-name
   url-pattern
 /SnoopServlet
   /url-pattern
 /servlet-mapping

 mperreno wrote:
  Is it possible to use non-standard paths for servlet i.e. use map
  anything after the context name to servlets:
  www.foobar.com/foo/SnoopServlet
  instead of
  www.foobar.com/foo/servlet/SnoopServlet
 
  I managed to do it with tomcat 3.2 but I can't do it with tomcat 3.3
 
  thanks
 
  --
  mathieu perrenoud [iis]

-- 
mathieu perrenoud [kesako]



Warp connector hangs on images (W2K)

2001-10-24 Thread Geoff Howard

I have had a consistent problem with images being served via the warp
connector in trying to install TC4.0.  I originally tried to piggy back this
on what seemed to be the same problem in another thread -- sorry, I guess
that was poor etiquette.  I don't do these lists much and didn't see that in
the suggestions for proper posting.

Here's the short of it:after installing the binary download of 4.0.1 on
Apache 1.3.20, I first attempt the examples context on port 8080, which
works fine.  I then attempt it on :80.  The text of the page displays fine
but the images never download.  The browser displays the message
Downloading picture ... code.gif.  If I disable image display in my browser
prefs, everything screams along.  I confirm that the examples are actually
running by going to the session servlet example and see that it's tracking
me correctly, which it is.

The further confusing point is that my co-worker has no problem using the
same setup.  I also had everything working fine under TC3.2.

I've tried using the nightly snapshots (although there are enough quirks to
compiling them that I'm not convinced I got it right).

Does anyone have any suggestions?

Geoff Howard



RE: Tomcat 3.3 classpath

2001-10-24 Thread Larry Isaacs

The :staticClasspath portion of tomcat.bat is executed only for
the env and jspc actions, but not for start and the others.
They use just: set CLASSPATH=%TOMCAT_INSTALL%\lib\tomcat.jar.

However, adding classes via the CLASSPATH is more often than not,
a source of problems.  A lot depends on how those classes will be
used and what other classes need to be visible to those classes.

Here are the recommended methods for adding class files in order
of preference (assuming you don't want to put them in a webapp's
WEB-INF/classes directory):

1) Create a classes directory under lib/container,
lib/common, or lib/apps as desired, and place the classes
under there.  The classes directory will be included in the
corresponding classloader.  This method hasn't made it into
the documentation yet.

2) Specify your classpath entry in one of the following Java
System properties:

org.apache.tomcat.common.classpath  - Common classloader
org.apache.tomcat.apps.classpath- Apps classloader.

On NT and Win2k, you can use the TOMCAT_OPTS environment
variable to accomplish this, i.e.

set TOMCAT_OPTS=-Dorg.apache.tomcat.apps.classpath=d:\

This won't work on Win98 because it doesn't like the '='
inside the environment variable value.  You will need to
add the -D... to the tomcat.bat command that executes java.

3) Modify the tomcat.bat to set the CLASSPATH differently.

Hope this helps.

Larry


 -Original Message-
 From: Hornsby Peter [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 4:36 AM
 To: '[EMAIL PROTECTED]'
 Subject: Tomcat 3.3 classpath
 
 
 Cheers for the earlier suggestion on the problems with using 
 Saxon, I've
 now installed Tomcat 3.3 and that problem has disappeared.  However:
 Tomcat is installed in d:\tomcat3.3.  I want to reference some class
 files in d:\.  I've tried editing the :staticClasspath part of
 tomcat.bat, putting the line 
 
 set CLASSPATH=%CLASSPATH%;d:\
 
 at the end, but this doesn't seem to resolve the 
 problem...any thoughts?
 
 Cheers,
 Pete
 
 
 -- 
 The Information contained in this E-Mail and any subsequent 
 correspondence
 is private and is intended solely for the intended recipient(s).
 For those other than the recipient any disclosure, copying, 
 distribution, 
 or any action taken or omitted to be taken in reliance on 
 such information is
 prohibited and may be unlawful.
 



Re: servlet upload

2001-10-24 Thread Bo Xu

E B wrote:

 In my webapp under tomcat, I am using oreilly's
 cos.jar for uploading files. I observe that
 repeated uploading of same file fails. ie., when
 I upload a file for second time(different content,
 same file name), in my servlet I am getting the
 old file only. It is probably due to caching,
  does anybody know how do disable this caching ?

 the files are jar files. does jvm cache them ?
 or tomcat ? I see some jar cache files in the temp.
 The class used to access the uploaded file is
 com.oreilly.servlet.MultipartRequest
 [...]

I use TC-4.0 + cos.jar(cos-23Jan2001.zip from www.servlets.com) to test
it,
I upload zTest.jar twice(same name, different content),  in
Servlet-side, I get
the new zTest.jar in the 2nd time.


Bo
Oct.24, 2001






Problems Running tomcat as a service

2001-10-24 Thread Vara Prashanth

Hello all:

I am trying to get tomcat to run as a service on a win2k box but am having
problems.

I follow the manual for installing the service and create a service
successfully.

jk_nt_service -i Jakarta c:\jakarta-tomcat\conf\wrapper.properties
I get the response:

Asked (and given) winsock 1.1
The service named Jakarta was created. Now adding registry entries
Registry values were added
If you have already updated wrapper.properties you may start the Jakarta
service by exec
uting net start Jakarta from the command prompt

but when I do a net start Jakarta I get the following:

The Jakarta service is starting.
The Jakarta service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.


C:\jakarta-tomcat\confnet helpmsg 3534

The service did not report an error.

EXPLANATION

The service did not report an error.

ACTION

Try the task later. If the problem persists, contact your network
administrator.

Why is this happening? I tried starting the service from the services applet
too but it gives the same error.

I know a lot of you must have answered this kinda question beforecan you
please do it again?

Thanks a bunch
Regds
Prashanth


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




Re: Precompiled jsp's

2001-10-24 Thread dhay



You have to define them in your web.xml, for each jsp like this:

   servlet
servlet-nameindex/servlet-name
servlet-classJspServ.index/servlet-class
   /servlet

   servlet-mapping
servlet-nameindex/servlet-name
url-pattern/index.jsp/url-pattern
   /servlet-mapping

where JspServ is directory you have placed them in.

Hope that helps,

Dave





Thys De Wet (ZA) [EMAIL PROTECTED] on
10/24/2001 05:12:37 AM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Precompiled jsp's



Ok so I got my  JSP's compiled into class files..
Placed them in /WEB-INF/classes..
Now how do I tell Tomcat 3.2.3 to use these class files ...

ANy help

PLEASE ..

*begs on knees*



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

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**









Re: Precompiled jsp's

2001-10-24 Thread Barry White

Why are you pre-compiling the JSP's?
Doesn't Tomcat do that automatically?

- Original Message - 
From: Thys De Wet (ZA) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 5:12 AM
Subject: Precompiled jsp's


 Ok so I got my  JSP's compiled into class files..
 Placed them in /WEB-INF/classes..
 Now how do I tell Tomcat 3.2.3 to use these class files ... 
 
 ANy help 
 
 PLEASE ..
 
 *begs on knees*
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 
 www.mimesweeper.com
 **
 




question

2001-10-24 Thread Pal, Anshu

Hi!
I recently installed Tomcat ( ver 3.3) . Where should I put the non -servlet
class files required by the servlets . I tried putting them under
WEB-INF/classes directory. I get a java.lang.NoClassDefFoundError Exception.
I tried putting them in the WEB-INF lib directory . doesn't work either.

Any suggestions ?
TIA


Anshu Pal

Proprietary/Confidential Information belonging to CGI may be contained in
this message. If you are not a recipient indicated or intended in
this message (or responsible for delivery of this message to such person),
or you think for any reason that this message may have been
addressed to you in error, you may not use or copy or deliver this message
to anyone else. In such case, you should destroy this message
and kindly notify the sender by reply e-mail.




DB jars files in common/lib (?)

2001-10-24 Thread raj

I have 3 jar files needed for connecting to the DB (when enabling JDBC 
realm). I am placing them in
CATALINA_HOME/common/lib.

One of these jar contains com/sun/java/util/collections (don't ask me 
why, its a weblogic jar file).

When I start  Catalina, I get :

java.lang.reflect.InvocationTargetException: 
java.lang.NoClassDefFoundError: com/sun/java/util/collections/Collection

java version is 1.3.0

Could this be a JDK issue?


Cheers
-raj




RE: Problems Running tomcat as a service

2001-10-24 Thread Vara Prashanth

Just to add.I am running IIS 5.0 and jdk 1.3.1...the problem is
frustratingand it has been persisting for quite some time nowplease
help with this.

Thanks

Hello all:

I am trying to get tomcat to run as a service on a win2k box but am having
problems.

I follow the manual for installing the service and create a service
successfully.

jk_nt_service -i Jakarta c:\jakarta-tomcat\conf\wrapper.properties
I get the response:

Asked (and given) winsock 1.1
The service named Jakarta was created. Now adding registry entries
Registry values were added
If you have already updated wrapper.properties you may start the Jakarta
service by exec
uting net start Jakarta from the command prompt

but when I do a net start Jakarta I get the following:

The Jakarta service is starting.
The Jakarta service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.


C:\jakarta-tomcat\confnet helpmsg 3534

The service did not report an error.

EXPLANATION

The service did not report an error.

ACTION

Try the task later. If the problem persists, contact your network
administrator.

Why is this happening? I tried starting the service from the services applet
too but it gives the same error.

I know a lot of you must have answered this kinda question beforecan you
please do it again?

Thanks a bunch
Regds
Prashanth


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




Can't get precompiled JSP to be welcome page?

2001-10-24 Thread Alex Colic

Hi,

I have a JSP file, pwLogin.jsp that I precompiled. I then added the
following to my web.xml file:

servlet
servlet-namepwLogin/servlet-name
servlet-classpwLogin/servlet-class
/servlet

...

servlet-mapping
servlet-namepwLogin/servlet-name
url-pattern/pwLogin.jsp/url-pattern
/servlet-mapping

...

!-- The Welcome File List --
welcome-file-list
welcome-file/pwLogin.jsp/welcome-file
  welcome-filepwLogin.jsp/welcome-file
/welcome-file-list

When I access my web app without specifiying a JSP I get a page of web apps
root directory. If I specify webapp/pwLogin.jsp I get the page.

Any help, ideas is appreciated.


Alex




RE: Problems Running tomcat as a service

2001-10-24 Thread Vara Prashanth

Hey everyone:

I solved the problem I was facing. real sorry to be so much trouble. The
problem was with the wrapper.properties file as expected.

There is an instance of parser.jar and jaxp.jar in the file which i happened
to remove from the lib directory and replace them with xalan.jar and
xerces.jar. I replaced the same in the file and bingo! it starts working

Thanks again
Prashanth

-Original Message-
From: Vara Prashanth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 24, 2001 1:31 PM
To: [EMAIL PROTECTED]
Subject: RE: Problems Running tomcat as a service


Just to add.I am running IIS 5.0 and jdk 1.3.1...the problem is
frustratingand it has been persisting for quite some time nowplease
help with this.

Thanks

Hello all:

I am trying to get tomcat to run as a service on a win2k box but am having
problems.

I follow the manual for installing the service and create a service
successfully.

jk_nt_service -i Jakarta c:\jakarta-tomcat\conf\wrapper.properties
I get the response:

Asked (and given) winsock 1.1
The service named Jakarta was created. Now adding registry entries
Registry values were added
If you have already updated wrapper.properties you may start the Jakarta
service by exec
uting net start Jakarta from the command prompt

but when I do a net start Jakarta I get the following:

The Jakarta service is starting.
The Jakarta service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.


C:\jakarta-tomcat\confnet helpmsg 3534

The service did not report an error.

EXPLANATION

The service did not report an error.

ACTION

Try the task later. If the problem persists, contact your network
administrator.

Why is this happening? I tried starting the service from the services applet
too but it gives the same error.

I know a lot of you must have answered this kinda question beforecan you
please do it again?

Thanks a bunch
Regds
Prashanth


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




RE: Precompiled jsp's

2001-10-24 Thread Randy Layman

Create servlet mappings from the desired URL (i.e. /directory/file.jsp) to
the generated class names.  If you are using JSPC to precompile the files,
pass it the --webxml flag and it will generate the relevant portion of the
web.xml for you.

Randy


 -Original Message-
 From: Thys De Wet (ZA) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 24, 2001 5:13 AM
 To: '[EMAIL PROTECTED]'
 Subject: Precompiled jsp's
 
 
 Ok so I got my  JSP's compiled into class files..
 Placed them in /WEB-INF/classes..
 Now how do I tell Tomcat 3.2.3 to use these class files ... 
 
 ANy help 
 
 PLEASE ..
 
 *begs on knees*
 
 
 
 **
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom they
 are addressed. If you have received this email in error please notify
 the system manager.
 
 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.
 
 www.mimesweeper.com
 **
 



File Download - CSV question ****

2001-10-24 Thread Evan Swanson


I wrote an application that for Tomcat 3.2 running on window. In the HTML
the is a reference ( A HREF=/filname.csv ) to the filename. 
When I run this on windows I get a popup save as selection box. 
When I run this on Tomcat4.0 on Unix it no longer gives me the selection box
but instead displays the data on the screen.

Is this a difference between TC32 adn TC40 or Unix / Windows.
Is this configurable.


Thanks in advance.




RE: WAR auto-deploy context permissions

2001-10-24 Thread Brad . Moreland

Carl:
I assume you are using a unix variant.  You could chown all of the new files
in the webapps directory...  You could add this to the startup script.

Brad Moreland

-Original Message-
From: Carl Bacher [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 19, 2001 2:22 PM
To: [EMAIL PROTECTED]
Subject: WAR auto-deploy  context permissions


I'm trying to create contexts for the developers at my site by simply
posting the war file, eg. mycontext.war, in the webapps directory and
restarting tomcat, which creates and automatically extracts it to a
context directory named mycontext.

It works fine, but the permissions on the directories and files are all
only writeable / executable to the owner, which is root (presumably
because tomcat was started as root). They are also all in the root
group.

Is there a way to configure tomcat such that, when the war file is
extracted, the expanded context directory hierarchy has the permissions
it was either jarred up with, or uses an owner/group other than root so
that the permissions can be updated by someone in that group?

I'm currently just specifying the context in the server.xml file,
creating the directory in webapps and extracting the war file manually,
which works just fine.

Thanks, Carl
+++The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and destroy any copies of this
document.+++



problems on integration Apache 1.3 and tomcat 4.0 under NT environment

2001-10-24 Thread Bin . Huang





 Hi, there,
 
 Here is the problem:
 
 I succeed install Apache 1.3 and tomcat 4.0.  it works fine independently.
 
 Now I am trying to integrate them together as following:
 
 1) downloaded mod_webapp...for win32 and unzipped
 
 2) copied mod_webapp.so and libaper.dll to the module directory in Apache
 
 3) edit configuration file of Apache and problems appear here:
   A. add a line of :
   LoadModule webapp_module modules/mod_webapp.so
   AddModule  webapp_module mod_webapp.c
 
   B. run the program of test configuration and it returns:
 
   Cannot add module via name 'mod_webapp.c': not in list of
 loaded modules
   C. If I comments out the line AddModule mod_webapp.c and run test
 configuration, it returns Syntax OK.
   Q: Can we leave this line commenting out?  If no, what to
 do?
 
   D. with the above item C (commenting out), I added the following:
   WebAppConnection warpConnection warp localhost:8008
   webAppDeploy examples warpConnection /examples/
 
   and run the test configuration, it returns:
   Invalid virtual host name
   Q: I did not edit virtual host name, why it says invalid?
 How to solve this problem?
 
   E. For win32, do we need mod_jserv file in the modules directory of
 Apache? If yes, where can I find a built mod_jserv file? is the file
 libaper.dll a equivalent of mod_jserv?
 
 Thank you very much for help.
 
 Bin 



RE: Compilation Error when building Tomcat

2001-10-24 Thread Nitin Vira

Hi Craig,

I am really sorry for taking up too many of your resources on this, but i just cant 
figure out how to get tomcat to build. 
I used the release version of tomcat source and i think it gets build upto dist-static 
and then it gives the following error, i think in target dist-prepare,

tomcat-docs:

BUILD FAILED

C:\jakarta-tomcat-4.0-rc1-src\webapps\tomcat-docs\build.xml:84: Class org.apache
.tools.ant.taskdefs.XSLTProcess doesn't support the nested param element


So i downloaded the latest source from the nightly builds but after updating 
build.properties when i try to run ant -projecthelp i get following error

C:\Tomcat\jakarta-tomcat-4.0ant -projecthelp
Searching for build.xml ...
Buildfile: C:\Tomcat\jakarta-tomcat-4.0\build.xml

BUILD FAILED

C:\Tomcat\jakarta-tomcat-4.0\build.xml:239: Class org.apache.tools.ant.taskdefs.
Zip doesn't support the nested zipfileset element

Total time: 1 second

Could you please help me figure out the problem,
Thanks for your help.
Nitin

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 11:04 AM
To: [EMAIL PROTECTED]
Subject: RE: Compilation Error when building Tomcat




On Tue, 23 Oct 2001, Nitin Vira wrote:

 Date: Tue, 23 Oct 2001 10:12:43 -0700
 From: Nitin Vira [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: RE: Compilation Error when building Tomcat

 Hi Craig,

 I figured as much, but i dont quite get from where to get the latest servlet.jar and 
where to put and make the ant pick up this jar and not any other.
 Thanks once again for your help.


See the BUILDING.txt file in the top level source directory of Tomcat.
It tells you exactly where to get everything (including getting the latest
Servlet and JSP classes from the jakarta-servletapi1-4 repository).

 Nitin


Craig




log-off event bug in JDK 1.3.1

2001-10-24 Thread Hassan, Steve

Refering to the following:

Notice for JDK 1.3 users: There is a known problem
http://developer.java.sun.com/developer/bugParade/bugs/4323062.html in JDK
1.3 that affects Java applications being run as Windows NT services. The bug
causes the service to terminate when the currently logged in user logs out.
The simplest way to work around this problem is to use JDK 1.2. If your
application requires JDK 1.3 features then you may want to look into
javaserv http://www.kcmultimedia.com/javaserv/ or JavaService
http://www.alexandriasc.com/software/JavaService/. Users have reported
success with both of these packages but there may be others that work as
well. 

I have written my own NT Service program that works fine with JDK1.3.1, and
does not suffer from the logout bug. The solution is to disable the windows
logoff event in the Windows ConsoleControlHandler.

E.g.

BOOL WINAPI ConsoleControlHandler(DWORD dwCtrlType)
{
switch (dwCtrlType)
{
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
case CTRL_CLOSE_EVENT:
case CTRL_SHUTDOWN_EVENT:
case CTRL_LOGOFF_EVENT:
return TRUE;
}

// Let parent handler (the VM) take care of anything else.
return FALSE;
}


Steve
--
Steve Hassan, Project Programmer

+44 (0)1206 872144 - Direct line
HassanSteve - Instant Messenger
http://dastar.essex.ac.uk/~hasss/
 
UK Data Archive
University of Essex   
Wivenhoe Park 
Colchester
Essex CO4 3SQ
United Kingdom
 
+44 (0)1206 872001 - Tel
+44 (0)1206 872003 - Fax
 
www.data-archive.ac.uk  
www.nesstar.org




tomcat session problem

2001-10-24 Thread Rinku Randhawa

Hi there,

I am using jakarta-tomcat - 3.2.3 server to run my project. I am finding
that session tracking, when more than one browser window is opened at one
time, doesn't come out to be correct. I am using its inbuilt session object
and the cookies are enabled in my browser. When more than one sessions are
running then the page presented is unpredictable.Sometimes correct page
displays and sometimes totally diferent page gets displayed. It works great
except if I have 2 browsers sessions up - then it gets confused and losses
track of which is the current session.

Are there any issues with the Tomcat server regarding session tracking?

Thanks in advance,
-Rinku





Re: Precompiled jsp's

2001-10-24 Thread Carl Bacher

You should be putting your uncompiled jsp's in your context's root
directory (webapps/your-context/your.jsp). Tomcat will do the compiling
for you.

When you access it via http://host:port/your-context/your.jsp, Tomcat will
compile it for you and put the class file (and source file) in the 'work'
directory, probably tomcat/work/your-context.

If it's already been compiled and the timestamp on the compiled version is
more recent than the timestamp on your.jsp file, it will use the compiled
version it already has.

Carl


Thys De Wet (ZA) wrote:

 Ok so I got my  JSP's compiled into class files..
 Placed them in /WEB-INF/classes..
 Now how do I tell Tomcat 3.2.3 to use these class files ...

 ANy help

 PLEASE ..

 *begs on knees*

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

 This footnote also confirms that this email message has been swept by
 MIMEsweeper for the presence of computer viruses.

 www.mimesweeper.com
 **




Re: X Windows and Tomcat

2001-10-24 Thread Gustavo Lima

Krasi, you need to install a dummie Xserver named Xvfb. With this
Xserver running you can shut your Xwindows without stopping tomcat.

You´re welcome

Gustavo

OPENGATE Gustavo P. M. Lima Supervisor de Sistemas http://www.opendf.com.br
[EMAIL PROTECTED]
- Original Message -
From: Krasi Zlatev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 9:07 AM
Subject: X Windows and Tomcat


 Why when I close X Windows, Tomcat exits?

 Thank you!

 =
 Krasi Zlatev
 Enjoy!

 __
 Do You Yahoo!?
 Make a great connection at Yahoo! Personals.
 http://personals.yahoo.com






[ANNOUNCEMENT] Tomcat 3.3 RPM Fixed

2001-10-24 Thread GOMEZ Henri

A little problem was discovered by Nicolas Mailhot,
in the tomcat 3.3, java part, with an incorrect tomcat 
init script which wasn't used the new 'nobody' work mode.
Now tomcat run as nobody by default for security purposes.

The RPM has been updated to -2 release and the old one
removed :

http://www.apache.org/dist/jakarta/jakarta-tomcat/release/v3.3/rpms/

tomcat-3.3-2.src.rpm
tomcat-3.3-2.noarch.rpm
tomcat-webapps-3.3-2.noarch.rpm
tomcat-manual-3.3-2.noarch.rpm 

For those of you who has allready installed the tomcat and want
to let it in place (for example in production system), the fix 
is easy.

Replace the init script (/etc/rc.d/init.d/tomcat) by the one attached 
and make the /var/spool/tomcat and /var/log/tomcat dirs must be owned 
by nobody/nobody:

chown -R nobody:nobody /var/log/tomcat
chown -R nobody:nobody /var/spool/tomcat

Sorry for the disturbance and a big thanks to Nicolas for his quick
discovery and report.

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


 tomcat


IBM iSeries (AS/400) using Apache 2.0 and Tomcat

2001-10-24 Thread GOMEZ Henri

Apache 2.0.18 is present in iSeries (AS/400)

http://www-1.ibm.com/servers/eserver/iseries/software/http/services/apache.h
tm

And they use tomcat also 

http://www-1.ibm.com/servers/eserver/iseries/software/http/services/tomcat.h
tml

And to link the both they use mod_jk (ajp12/ajp13/jni)

;)


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