Re: definitive answer on JSPC?

2003-02-05 Thread Brett Porter
I'm working off 4.1.18 and it appears it has been the same all through 
4.x, even through the jasper rewrite of 4.1.4.

I understand this is the problem I'm facing - I was hoping for a cleaner 
solution than to run javac individually for the 200 or so JSP files. 
That is what I'll do if needed, so I'd appreciate the work you've done. 
I'll check out the ant list of any mention of it - I didn't think of 
that originally but it makes sense.

Still, I'd hope one of the jasper developers might shed some light on 
the other points?

Cheers,
Brett

Chris McNeilly wrote:
Don't know how 'definitive' this is, but here are my experiences.

Its a bug/feature of jspc, depending on how you look at it.  As it loads
all relevant jsp files into memory to compile, it only used the file
name, not the full path, making the compiler see all your index.jsps as
the same, which causes the error.  I believe there is a fix for this out
there somewhere.  I found a pointer to the fix on an Ant message board. 
I also added functionality to Ant that compiles each jsp in its own
memory space, thus working around the bug.  Let me know if you can't
find the fix (it might already be part of the next Tomcat build) and
want to dork around with my effort.  The work I did on it was back about
3 months ago, so I don't know what has been done recently.

Chris



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




definitive answer on JSPC?

2003-02-04 Thread Brett Porter
Hi,

I'm looking for a definitive answer about JSPC in Tomcat 4.1 and 
precompilation. Searching the archives hasn't yielded answers to the 
questions I've been curious about. It'd be great to get definitive 
answers for the archive, and perhaps a FAQ as it is not covered in 
either tomcat-user, the doco, or JGuru.

Background: In TC3.2.4 I currently precompile all JSPs using the ant 
jspc task and the TC3.2 jasper/webserver jars.  I then munged the 
generated java files into the format required by TC3.2.4 and compiled 
them, then renamed them again to match. A little weird, but it worked 
since it used a flat directory structure, formatting the filenames 
with_002f etc. I dropped this into /WEB-INF/classes/precompiled_jsp and 
symlinked it from work/localhost_8080%2Fapps.

The reason this was necessary was that the server choked under the load 
trying to compile the JSPs. There seemed to be no deadlocking so it 
would spawn numerous javacs and start swapping, and you get the picture :)

With TC4.1 I can't take this approach because of the (albeit nicer) 
directory approach. However, because of duplicate names and the same 
package being used, I will need to compile each java file individually, 
complicating the build process considerably.

BTW, I'm aware of ?jsp_precompile=1 and it's not suitable.

Here are my questions regarding jspc from ant/cmd line:
1) is the definitive way to do it supposed to be the web.xml include 
method? If so, shouldn't JSP take a web.xml input and output a processed 
one? Regardless, doesn't this have negative side effects, like not then 
being able to edit the JSPs to make changes? (note that while we 
precompile, we may need to change some, and filtering them out would be 
a fair nuisance).
2) is there a way to do what I am looking for above, generating classes 
for all JSPs that are not fragments (for static include) which can be 
placed in the work dir? Does it have to have the same layout as the 
server to work?
3) what is the reason for the current layout and differences between cmd 
line and server compilation? ie. different dirs but same package.

My desired requirements for JSPC to work would be:
1) both JSPC and server generate the same java files to the same locations.
2) javac can be executed on the base directory on **/*.java, and the 
resulting classes dropped into the work directory. They would be used as 
long as their timestamps were newer than the jsp in question.

To achieve this, I'd suggest this:
1) package name is org.apache.jsp.PATH.TO.FILE (substituting/eliminating 
special characters - eg WEB-INF - WEBINF)
2) class remains myJsp_jsp.java
3) have TC not only look under work but /WEB-INF/classes to avoid the 
symlink (ie if I specified my package as precompiled_jsp I'd get the 
result as I have for 3.2.4).

And a final question: how likely am I to encounter the problems had with 
3.2.4 if I upgrade to 4.1? I believe the jasper2 compiler is designed to 
be much more effecient - will it avoid generating the java files more 
than once and hence compiling them more than once, instead synchronizing 
on the operation? (this is effectively enough, although precompilation 
would still be even faster).

I'd appreciate any responses regarding this, and apologise for the 
verbosity level of the email! :)

Thanks,
Brett



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



Re: Craig, how do I .......

2002-06-24 Thread Brett Porter

Craig already wrote this:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/appdev/index.html

And can I recommend this:
http://www.tuxedo.org/~esr/faqs/smart-questions.html

STEVE R BURRUS wrote:
 Craig, how do I go about starting to work with Java Servlets and Java Server Pages
 in Tomcat's Web Container context?! You seem to be pretty damn knowledgeable about
 all aspects of Tomcat--just going by the answers which I have seen you supply to
 various users questions--so I REALLY THOUGHT that you could answer my query too.  
 
 **
 
 --- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 


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




Re: PLZ HELP Administration TC 4.0.3

2002-05-20 Thread Brett Porter

Micael Padraig Og mac Grene wrote:
 Some people forget what they did not know at one point.  Please forgive 
 them.  

While this is fair enough, its also fair that there's a level of 
frustration with people who clearly haven't read the docs.
There's a good example in there of how to set up Tomcat and your first 
webapp using ant and giving example code. Why repeat it over and over 
again on this list?
I certainly remember when I first used Tomcat last year. I read install 
guide, got it running, read the docs from there - ALL OF THEM. Funny how 
after that I didn't feel much need to post to the list.

 You may not realize that CATALINA_HOME, etc. are variables 
 covering certain urls.  I remember when I did not as well.
 

Just to make sure you don't confuse the original poster... what does 
CATALINA_HOME have to do with URLs?

 On the context stuff, the only real way to understand this, because no 
 one will really tell you or give you adequate examples, is to go to the 
 Tomcat code and see how the code is written.  After asking and trying to 
 get help many times, that is what I did.  It takes a bit, but then you 
 have a solid understanding of the Tomcat architecture.
 

That's a rather inflammatory and incorrect statement. The documentation 
is just fine - and if its not good enough for you, you are welcome to 
amend it. The example I gave above explains all this - going to the code 
isn't going to be very helpful if you aren't even at the level of 
starting the server and deploying a webapp.

Anyway... Mondays suck.

Cheers,
Brett


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




Re: VM size increases.

2002-05-13 Thread Brett Porter

You are really going to have to look at this more closely before 
pointing fingers :)

2 days with that many hits is actually a slow leak unless you have a lot 
of RAM. Still, a leak.

The leak could be in the JDBC driver, your code, or any other library 
(including Tomcat).

Have you upgraded to the latest Tomcat (3.2.4) in that line?

Your next step will be to use a profiling tool (JProbe, optimize it, 
etc) to find where the leak is. For instance, you may be using an 
infrequent circular reference in your code that causes it never to be 
release in garbage collection.

You should have your code modularised enough to be able to beat it 
outside the servlet container with something like JUnitPerf to see if 
you have any such problems in certain modules (this is often a little 
idealistic :)

Hope this helps,
Brett

Rajesh Mishra wrote:
 I'm using Tomcat3.2 and SQL server2000. I'm facing two problems mentioned
 below..
 
 1.The VM size of Tomcat's java.exe process increases gradually and it
 doesn't come down. As a result machine hangs.I've closed database
 connections and Resultset's everywhere I accessed database.
 
 2. On running Web Application Stress testing tool for 2 days (with 10
 threads and 4 socket multiplier), Tomcat crashes. 
 
 Rajesh
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]


-- 
| Brett Porter [EMAIL PROTECTED] .
. f2 network ~ everything essential  |
 --



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




RE: Linux-Tomcat looking for Windows files!!! HELP!!

2002-05-02 Thread Brett Porter

that's just someone out on the web with that silly code red virus.

You might want to check the URLs for yourself to make sure its not being
exploited, but I'm pretty sure its IIS only problem.

We get it all the time on our linux boxes, obviously not very successful,
but the 404's are a nuisance :)

Cheers,
Brett

-Original Message-
From: Jakarta Tomcat Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Friday, 3 May 2002 11:10 AM
To: [EMAIL PROTECTED]
Subject: Linux-Tomcat looking for Windows files!!! HELP!!


Subject: Linux-Tomcat looking for Windows files!!! HELP!!
From: Hyunjin Kim [EMAIL PROTECTED]
 ===
in my apache error.log file, I see

[Sat Apr 27 13:22:39 2002] [error] [client 211.255.112.14] File does not
exist:
/usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/scripts/..%5c../winnt/system32/
cmd.exe
[Sat Apr 27 13:22:39 2002] [error] [client 211.255.112.14] File does not
exist:
/usr/local/jakarta-tomcat-4.0.3/webapps/ROOT/scripts/..%2f../winnt/system32/
cmd.exe

what are they and how can i get rid of it?? I am running apache 1.3, tomcat
3.3, and mod_jk. It seems to me that either apache or tomcat is actively
looking for those files at all times!!

Your experties and help would really help me on this. THANKS



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



RE: Apache 2.0x with Tomcat 4.0x?

2002-04-29 Thread Brett Porter

searching the archives will turn up about 100 such messages.
http://www.mail-archive.com

-Original Message-
From: Jack Frosch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 30 April 2002 12:19 PM
To: 'Tomcat-User'
Subject: Apache 2.0x with Tomcat 4.0x?


Now that Apache 2.0x has been released, I'm wondering if Tomcat 4.0x can
work with it, using the Warp connector or something else?
 
Thanks.
 
Jack



RE: Install Tomcat 4.0 + JDK 1.4.

2002-04-24 Thread Brett Porter

1. the old XML parser was probably more lenient. The syntax in the XML
sounds wrong, something before the ?xml ? tag I guess

2. did you expect anything else? You are trying to serve the class file as
content, you should place it under WEB-INF/classes and then setup web.xml.
You should read some of the Tomcat documentation on how to construct a web
application.

Regards,
Brett

-Original Message-
From: Kroeksak Kongman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 24 April 2002 5:32 PM
To: [EMAIL PROTECTED]
Subject: Install Tomcat 4.0 + JDK 1.4.


Dear All,
 
  1. I'm install Tomcat 4.0 + JDK 1.4. I can run some jsp file
but XML have some error..
 
(.tld and jsp file, it can run in old version ...Tomcat 3.2.3  JDK 1.3.2)
 
  2. I can use javac to complie .java ot .class when I call
HelloWorld.calss from IE 6.0, 
it open window File Download ...for save this file to disk...it not work..
 
Please would you hep me for solve this problem..
 
Best Regards,
Kroeksak Kongman
 
(This can run in old version ...Tomcat 3.2.3  JDK 1.3.2)
Result:
 
 
org.apache.jasper.JasperException: XML parsing error on file
/WEB-INF/jsp/taglib.tld: (line 2, col 7): The XML declaration may only
appear at the very beginning of the document.
at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:218)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.ja
va:283)
at
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:219)



RE: Tomcat 4.0.3 + Apache 2.0.32

2002-04-16 Thread Brett Porter

I had issues compiling it dynamically on Cygwin, so I'd suggest going for
the static compilation into Apache which seems to work, although I then get
that jakarta-servlet error someone else mentioned.

- Brett

-Original Message-
From: Donald Lee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 17 April 2002 10:22 AM
To: Tomcat Users List
Subject: RE: Tomcat 4.0.3 + Apache 2.0.32


I thank you very much Pascal for the write-up it allowed me to get my mod_jk
configured a few months ago.  AFAIK, jk for Apache 2 is still not available.


-Original Message-
From: Pascal Forget [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 16, 2002 11:30 AM
To: Tomcat Users List
Subject: Re: Tomcat 4.0.3 + Apache 2.0.32


Bhide, Atul wrote:


The problem is solved. I compiled the latest version 4.0.4.b1 version of
the
tomcat-connectors and it works now.

You did succeed, that's fantastic!

My name is Pascal Forget and I wrote a little howto on how to setup
Apache 1.3.23 + mod_jk + tomcat + load balancer a while ago.
www.ubeans.com/tomcat

I want to update my howto for Apache 2.0, and the only thing I could
not get to work is the compilation step for mod_jk.

Would you please be kind enough to either provide me with a detailed
explanation on
how to compile mod_jk, or provide binaries?  I tried to compile mod_jk
for several
hours yesterday on a Red Hat Linux 7.2 i686 box with the latest patches
and I always
got error messages about dl_open() and other missing functions.

Ideally, I would like to produce binaries of mod_jk for Linux, FreeBSD,
Solaris, Windows
and a few other platforms and offer links to these on my web page.

Any help would be greatly appreciated!

Thanks,

Pascal



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


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



RE: What is different when running tomcat 4 as a service?

2002-04-11 Thread Brett Porter

often this occurs because PATH is like this:

PATH=c:\WINNT;c:\WINNT\SYSTEM32;c:\j2sdk1.3.1\bin

When installing Java, the JRE is put in Program Files, and an executable
java.exe and javaw.exe in c:\WINNT\SYSTEM32, which are found first and hence
use the JRE.

- Brett

-Original Message-
From: Greg Trasuk [mailto:[EMAIL PROTECTED]]
Sent: Friday, 12 April 2002 9:50 AM
To: 'Tomcat Users List'
Subject: RE: What is different when running tomcat 4 as a service?


I ran into the same thing trying to use the COMM api's under the service
option.  In my case, it turned out that although I had the JDK installed,
the service actually runs using the JRE (I think the installer actually
installs the JRE).  So when I put the extensions into C:\Program
Files\Javasoft\JRE\1.3.1\lib\ext (rather than my usual \jdk1.3.\lib\ext),
everything worked fine.  I haven't seen anything else that bit me while
trying to use Tomcat as a service.  It actually works fairly well as a
miniature application server!.

Cheers,

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: Jan Bentzen [mailto:[EMAIL PROTECTED]]
 Sent: April 11, 2002 14:58
 To: tomcat-user
 Subject: What is different when running tomcat 4 as a service?


 HI

 I recently tried running my Tomcat 4.0.1 as a service in w2k.
 (just clicking the service option when installing). Much to
 my surprise our webapplication no longer worked!
 Apparantly JAR files placed in jdk extensions directory could
 not be found when bootstrapping. (Due to several things which
 I wont go into here, they must be there).
 Why is this? How do I make it so that they can be found when
 runnning as a service? And what else differs when running as
 a service? Where can I find updated information about this
 (for tomcat 4)?

 Thanks
 Beno



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



RE: Multiple tomcats (4.0.3), Apache 1.3.20, RH 7.2 - Help pls, we're desperate!!!

2002-04-11 Thread Brett Porter

WebAppDeploy app2 conn2 /app1

I think this is the problem, try:

WebAppDeploy app2 conn2 /app2

:)

BTW, why run two instances? Why not deploy two webapps into one tomcat
instance?

Cheers,
Brett

-Original Message-
From: Jakarta Tomcat Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Friday, 12 April 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: Multiple tomcats (4.0.3), Apache 1.3.20, RH 7.2 - Help pls,
we're desperate!!!


Subject: Multiple tomcats (4.0.3), Apache 1.3.20, RH 7.2 - Help pls, we're
desperate!!!
From: Thinh Doan [EMAIL PROTECTED]
 ===
BlankWe're having a tough time configuring multiple tomcats running on the
same server using mod_webapp. Each individual tc starts up fine, each with
its own warp connector port and CATALINA_BASE.

Under this config. of httpd.conf:
...
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
NameVirtualHost 207.208.169.9
VirtualHost 207.208.169.9
ServerName www.app1.com
DocumentRoot /home/projects/GS/app1root
WebAppConnection conn1 warp localhost:8008
WebAppDeploy app1 conn1 /app1
/VirtualHost

VirtualHost 207.208.169.9
ServerName www.app2.com
DocumentRoot /home/projects/GS/app2root
WebAppConnection conn2 warp localhost:8009
WebAppDeploy app2 conn2 /app1
/VirtualHost
...
Apache error_log indicated that it can not bind app1. When looking into
apache_log under app2root/logs, it indicated that it was looking for app1
under app2root/webbaps.  Why?

from apache_log:
...
2002-04-11 16:38:18
[org.apache.catalina.connector.warp.WarpConfigurationHandler] Cannot find
/home/projects/GS/app2root/webapps/app1 for appl. app1 host
www.app1.com
2002-04-11 16:38:18
[org.apache.catalina.connector.warp.WarpConfigurationHandler] Error
deploying web application app1 under http://www.app1.com:80/app1/
... (repeating the above 2 lines zillion times)

If it looks for app1 under ../app1root/webapps, it should find it there.
What did we do wrong? Pls help. We've spent 2 weeks so far trying to do
this.  We're desperate, needless to say.

Thanks much,
Thinh

PS: tc server.xml of app2, similar setup for app1:
Server port=8006 shutdown=SHUTDOWN debug=0
!-- Define an Apache-Connector Service --
Service name=Tomcat-Apache
Connector className=org.apache.catalina.connector.warp.WarpConnector
port=8009 minProcessors=5 maxProcessors=75
enableLookups=true appBase=webapps
acceptCount=10 debug=0/
!-- Replace localhost with what your Apache ServerName is set to --
Engine className=org.apache.catalina.connector.warp.WarpEngine
name=Apache defaultHost=www.app2.com debug=0
!-- Global logger unless overridden at lower levels --
Logger className=org.apache.catalina.logger.FileLogger
prefix=apache_log. suffix=.txt
timestamp=true/

!-- define virtual host --
Host name=www.app2.com debug=0 appBase=webapps unpackWARs=true /
!-- Because this Realm is here, an instance will be shared globally --
Realm className=org.apache.catalina.realm.MemoryRealm /
/Engine
/Service
/Server



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



Cygwin fix, but problems: AJP from connectors-4.0.2

2002-04-09 Thread Brett Porter

Hi,

I've been trying to set up apache-2.0 and ajp13, Tomcat 4.0.3 under Cygwin.
I'm using the jakarta-tomcat-connectors-4.0.2-src.tar.gz download.
I'm using the native branch under jk, as native2 won't work with Cygwin -
something to ask the ant guys I guess, the so task fails.

I had issues getting shared objects to work - I know cygwin is still
toughing it out a bit with libtool, especially because of the
autoconf2.13/2.52 differences, so I built it static.

After a couple of small changes (I'll contribute them at the end), it
compiled fine and I rebuilt apache with mod_jk.c built in. httpd -l shows it
there.

I've used a working workers.properties configuration from my last setup, and
apache + mod_jk 1.2 starts up ok, but when I try to access something via ajp
I get a 500. The error_log reveals that it can't factory the worker
ajp13*ajp13.

I've started to look into the C code and am not sure why the property
worker.brick.type=ajp13 gets converted to ajp13*ajp13 - is this a known
bug?

Ok, here are the fixes for at least a static Cygwin build: is there a better
way to contribute them? (diffs?)

jk/common/jk_global.h: The #ifndef _OSD_POSIX needs to change to #if
!defined( _OSD_POSIX )  !defined( CYGWIN ) in the include section - that
sys header is not there and not needed

jk/buildconf.sh: automake chokes on the -i, but I'm nt sure why yet.
Removing it works ok.

jk/configure.in: AC_PROG_CC needs to be before the LIBTOOL defs. Works for
cygwin - don't know if it would break anything else.

When finished building, the config.m4 put into the apache build directory is
missing the subdirectory name of the static library, so it is unable to find
it without editing it.

Hope this helps!

Cheers,
Brett

~*~*~*~*~*~*~
Brett Porter - Web Developer
f2 Network ~ everything essential
Ph: +61 2 8596 4437
Email: [EMAIL PROTECTED]



RE: Tomcat with JPDA WAS: Off Topic: Free J2EE IDE: Which one?

2002-03-20 Thread Brett Porter

Or, you could just run 

catalina.sh jpda start

?


-Original Message-
From: Gregor Kovaè [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 20 March 2002 11:15 PM
To: Tomcat Users List
Subject: RE: Off Topic: Free J2EE IDE: Which one?


Hi!

Here:

put parameters to java:
-Xint -Xdebug -Xnoagent 
-Xrunjdwp:transport=dt_socket,server=y,address=12999,suspend=n
in your tomcat startup script.
Start tomcat first.
Start NetBeans, go to Debug Attach menu. Select JDPA debugging, your 
hostname and 12999 for port. Click OK. :)
You should be able to debug things running in tomcat now.

Best regards,
 Kovi



At 09:07 20.3.2002 +, you wrote:
Can you give any more explicit instructions for how to do this?? It would
be
extremely useful!

Thanks in advance.



Chris



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of hanasaki
Sent: 19 March 2002 17:33
To: Tomcat Users List
Subject: Re: Off Topic: Free J2EE IDE: Which one?


You can integrate Tomcat 4 yourself ;)

Change the startup scripts to support JPDA
Attach with Netbeans
For soruce debugging you will need to mount the Tomcat directories in
your netbeans project

Chris Pheby wrote:
  I am using netbeans right now (for Servlets not J2EE). Tomcat 4
integration
  is not here yet, but in practice this has yet to prove a problem.
 
  The draft versions of the forthcoming Using Netbeans oreilly book are
on
  the netbeans site and really speeded learning the editor for me.
 
 
  Chris.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  On Behalf Of Bing Zhang
  Sent: 19 March 2002 16:35
  To: '[EMAIL PROTECTED]'
  Subject: Off Topic: Free J2EE IDE: Which one?
 
 
  I am trying to use a free IDE to do J2EE development, mainly servlet and
  EJB. The development will be on Windows NT/2000. Deployment is on linux.
  Three tools come to my mind: Forte Java Community Edition (I am
supprised
  that almost nobody mention this tool), Eclipse from IBM and NetBean.
 
  I feel short time evaluation does not give me enough insight, though I
have
  downloaded both Forte and Eclopse. Hope anyone ever used the above tools
in
  real life give me some guidance. Any of the above tools let me debug
servlet
  or even EJB locally? How about remotely? Any other server I need to set
up
  beside the IDE to effectively do J2EE?
 
 
 
  Thanks,
 
  Bing Zhang
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 


--
=
= [EMAIL PROTECTED]  =
= Spam : Unhealthy and High in Sodium and Cholesterol   =
=


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




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


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



RE: Free J2EE IDE: Which one?

2002-03-18 Thread Brett Porter

since you post to the Tomcat list, I guess you are a Tomcat user. Therefore
Netbeans or Forte (essentially the same program) would be a good choice as
they have an integrated Tomcat container. I prefer Netbeans for the cutting
edge stuff, some might like Forte for the extra tools (most of which are now
integrated into the main NB tree).

You can debug almost anything using JPDA, even remotely.

I haven't used Eclipse.

More info would be best requested from the IDE's respective mailing lists.

Cheers,
BRett

-Original Message-
From: Bing Zhang [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 19 March 2002 4:31 PM
To: '[EMAIL PROTECTED]'
Subject: Free J2EE IDE: Which one?


I am trying to use a free IDE to do J2EE development, mainly servlet and
EJB. The development will be on Windows NT/2000. Deployment is on linux.
Three tools come to my mind: Forte Java Community Edition (I am supprised
that almost nobody mention this tool), Eclipse from IBM and NetBean.

I feel short time evaluation does not give me enough insight, though I have
downloaded both Forte and Eclopse. Hope anyone ever used the above tools in
real life give me some guidance. Any of the above tools let me debug servlet
or even EJB locally? How about remotely? Any other server I need to set up
beside the IDE to effectively do J2EE?


Thanks,

Bing Zhang

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



RE: HOW TO start tomcat on linux boot

2002-03-06 Thread Brett Porter

Is CATALINA_HOME set?
IS JAVA_HOME set?
what about CATALINA_BASE?

Also, I don't personally like running things as root - you might want to
install your webapps as another user (I just called it appuser), and su to
that before executing tomcat.

- Brett

-Original Message-
From: Gustavo Souza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 7 March 2002 9:52 AM
To: Tomcat Users List
Subject: HOW TO start tomcat on linux boot


hello, im trying to start tomcat on linux boot...

but $CATALINA_HOME/bin/startup.sh didnt work on the rc.local

it only works when I type it on prompt..

anyone can help ?

thanks



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



RE: JSP documentation

2002-03-04 Thread Brett Porter

For Java, you use Javadoc (go to java.sun.com, don't ask those questions
here).

For JSP, you can use %-- for comments not passed to the user --% But you
don't get any Javadoc from that. I believe it is enough documentation for a
JSP and the rest should be external (view structure).

- Brett

-Original Message-
From: Ming [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 5 March 2002 10:53 AM
To: Tomcat Users List
Subject: JSP documentation


Hi,

I'm very new at Tomcat and JSP programming but have written some JSP
scripts.
Can someone tell me what's the best way to write in-program
documentation? I mean the documentation that can be embedded in the program.
I'm planning to write a separate documentation but heard that there might be
a
way that I can embed the documentation in the program and can be viewed
separately.

Any information will be really helpful.

Thanks.

Ming



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



RE: Pls Help!! Uploading an image

2002-03-04 Thread Brett Porter

You might try struts: http://jakarta.apache.org/struts

It has an easy way to get multipart content from a form, including an easy
example, but there is a learning curve to setting up struts itself.
The code is not going to just appear before your eyes unfortunately :)

- Brett

-Original Message-
From: Uma Maheswar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 5 March 2002 12:33 PM
To: Tomcat Users List
Subject: Re: Pls Help!! Uploading an image


Hi,
I tried using O'Reilly, but it is confusing. I need a simple one than that
one. Can you help me?

Uma

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Tuesday, March 05, 2002 2:34 AM
Subject: Re: Pls Help!! Uploading an image


 Uma,
 The O'Reilly servlets book has a good example (including
 code) where you can
 upload files (including images as part of a form).
 See
 http://www.servlets.com/cos/javadoc/com/oreilly/servlet/m
 ultipart/MultipartP
 arser.html for more info.
 Hope this helps.
 Satyakant Evani
 - Original Message -
 From: Uma Maheswar [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, March 04, 2002 10:49 AM
 Subject: Pls Help!! Uploading an image


 HI,
 I need help from any of you. I need a programme to
 upload an image to the
 database while submitting a form. If any one is having
 the source code pls
 help  me.

 Regards
 Uma

  nope i am using tomcat from my user area ..
  both tomcat and apache run from my user area
  there is some problem with a particular .so file which it is not able to
  find
 
 
  -Original Message-
  From: brian ally [mailto:[EMAIL PROTECTED]]
  Sent: Monday, March 04, 2002 11:04 PM
  To: Tomcat Users List
  Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared
  library path
 
 
  Are you starting tomcat as root? On my linux box, if i su to root, all
  manner of LD_LIBRARY_PATH problems begin. i need to su - (with the
  dash). Could this be your problem?
 
  /b
 
  Abhishek Pamecha wrote:
 
  it is there..
  
  -Original Message-
  From: Toru Watanabe [mailto:[EMAIL PROTECTED]]
  Sent: Monday, March 04, 2002 2:34 PM
  To: Tomcat Users List
  Subject: Re: java.lang.UnsatisfiedLinkError: no ocijdbc8 in shared
  library path
  
  
  
  First, please make sure that Oracle client is installed
  in your machine.
  
  Abhishek Thanks buddy!
  Abhishek but ..i already did that
  Abhishek but i have a a requirement which says i have to use oci
client
  only
  Abhishek any other solution ???
  
  UnsatisfiedLinkError means JVM can't find shared library.
  You need to add shared library path to environment variable.
  
  If you use solaris or linux, then you should add following
  statement in your tomcat.sh.
  
  LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
  export LD_LIBRARY_PATH
  
  if you use HP-UX, then
  
  SHLIB_PATH=$ORACLE_HOME/lib:$SHLIB_PATH
  export SHLIB_PATH
  
  if you use Windows, then you should add following to tomcat.bat.
  
  set PATH=%ORACLE_HOME%\lib;%PATH%
  
  
  then it will be able to find shared library.
  
  regards,
  Watanabe.
  
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
  
  
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
  
  
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

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




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



mod_proxy and getRemoteAddr()

2002-02-20 Thread Brett Porter

Hi,

I configured mod_proxy as per the Tomcat 4.0 doco. All working fine, but
I've recently tried calling getRemoteAddr() and find I can't get anything
but 127.0.0.1. If I bypass mod_proxy (go straight to tomcat) it works ok,
reporting my IP address.

Does anyone know how I can get the remote address if I am using mod_proxy? I
tried mod_webapp and had too many problems - has that matured since
Tomcat-4.0? What about using AJP13?

Thanks,
Brett

~*~*~*~*~*~*~
Brett Porter - Web Developer
f2 Network ~ everything essential
Ph: +61 2 8596 4437
Email: [EMAIL PROTECTED]



RE: Hinding information from the URL (during the request)

2001-11-28 Thread Brett Porter

Use a POST request. If you are serious about making sure it is not
intercepted in the middle, you'll need to use SSL for the request too.

- Brett

-Original Message-
From: Mike Kelley [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 29 November 2001 4:50 PM
To: [EMAIL PROTECTED]
Subject: Hinding information from the URL (during the request)


I have a simple form that sets a page up so a user can query a DB, the
beginning of the page is a form where the user enters their user name and
password 

The password is hidden as the user types 

BUT
 
When they submit the query all connection data (including the password!) is
displayed in the address bar of the browser.

How do I stop from passing the information in the address bar (or at least
how do I hide it??)??

TIA

Mike

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



RE: JSP URL and Tomcat3.2.3

2001-11-26 Thread Brett Porter

because you are within the context of the web application WebPayroll, so
that path is prepended.
As long as you are using the current context, you can remove WebPayroll from
your URLs.

- Brett

-Original Message-
From: Slava [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 27 November 2001 3:04 PM
To: [EMAIL PROTECTED]
Subject: JSP URL and Tomcat3.2.3


Hello,
I'm passing Request Attributes from servlet to jsp
and I'm getting 404.
The request URL : /WebPayroll/company_entry.jsp.
But Tomcat adding extra path to URL.
Here is the part of tomcat.log:

2001-11-26 21:55:26 - Ctx( /WebPayroll ): 404 R( /WebPayroll +
/WebPayroll/company_entry.jsp +
  null) JSP file not found.


And here is the jasper.log :

2001-11-26 21:55:26 - JspEngine -- /WebPayroll/company_entry.jsp
2001-11-26 21:55:26 - ServletPath: /WebPayroll/company_entry.jsp
2001-11-26 21:55:26 - PathInfo: null
2001-11-26 21:55:26 - RealPath:
D:\jakarta-tomcat-3.2.3\WebPayroll\WebPayroll\company_entry.jsp
2001-11-26 21:55:26 - RequestURI: /WebPayroll/WebPayroll/company_entry.jsp
2001-11-26 21:55:26 - QueryString: null
2001-11-26 21:55:26 - Request Params: 
2001-11-26 21:55:26 - Classpath according to the Servlet Engine is:
D:\jakarta-tomcat-3.2.3 
  \webapps\WebPayroll\WEB-INF\classes

As result the URL become incorrect.
Please tell me how to fix it.
Thanks.




__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

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



RE: Tomcat 4 Upgrade Assistance?? - Tomcat 3.3 app does not startup under Tomcat 4.0

2001-11-14 Thread Brett Porter

this is due to the fact that the servlet 2.3 spec enforces the order of
elements in web.xml. Make sure they appear in the order given by the error
and it should be fine.

Cheers,
Brett

-Original Message-
From: Greg Callaghan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 15 November 2001 2:42 PM
To: [EMAIL PROTECTED]
Subject: Tomcat 4 Upgrade Assistance?? - Tomcat 3.3 app does not startup
under Tomcat 4.0


Hi,

I've got Tomcat 4 up and running fine with the example apps.  A separate 
application I have however, which runs fine under Tomcat v3.3, is having 
troubles starting up under Tomcat v4.

Are there any upgrading to Tomcat 4 (from Tomcat 3.3) guidelines which exist

which one needs to follow?  Changes required to web.xml file for example?

The specific problem I see is described below.

thanks in advance
Greg

PS Just joined the mailing list.



[1] Error on Startup
===
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
PARSE error at line 123 column 11
org.xml.sax.SAXParseException: The content of element type web-app must 
match (icon?,display-name?,descript
ion?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?
,mime-mapping*,welcome-file-list?,
error-page*,taglib*,resource-ref*,security-constraint*,login-config?,securit
y-role*,env-entry*,ejb-ref*).
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
==


[2] Details from Log file
===
2001-11-15 13:00:08 ContextConfig[/MultiChoice] Parse error in application 
web.xml
org.xml.sax.SAXParseException: The content of element type web-app must 
match 
(icon?,display-name?,description?,distributable?,context-param*,servlet*,se
rvlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,
taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-
entry*,ejb-ref*).
at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
at 
org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(X
MLValidator.java:1781)
at 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1425)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1149)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
at
org.apache.catalina.util.xml.XmlMapper.readXml(XmlMapper.java:275)
at 
org.apache.catalina.startup.ContextConfig.applicationConfig(ContextConfig.ja
va:256)
at
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:824)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:
224)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3334)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:712)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:599)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:777)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:463)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
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)

2001-11-15 13:00:08 ContextConfig[/MultiChoice]: Occurred at line 123 column

11
2001-11-15 13:00:08 

RE: Bringing up tomcat, reliably.

2001-11-11 Thread Brett Porter

Thank you for your reply.  I have tried HelloWorldExample and it is ok.
But I wonder how the path is set.

When I request http://apachehost/examples/servlets or
http://apahcehost/examples/servlets/index.html, I expect it will return
file d:/tomcat/webapps/examples/servlets/index.html in the tomcat server,
because I have the following line in the config file:
Alias /examples d:/tomcat/webapps/examples

But the error log return :
File does not exist: d:/tomcat/webapps/examples/servlets/index.html


Ada.

Larry Isaacs wrote:

 I don't know if it is a typo, but I don't believe there is
 a resource or directory corresponding to
 http://apachehost/examples/servlets, so 404 is the correct response.
 Try:

 http://apachehost/examples/servlet/HelloWorldExample

 Larry

  -Original Message-
  From: Ada [mailto:[EMAIL PROTECTED]]
  Sent: Friday, November 09, 2001 2:35 AM
  To: [EMAIL PROTECTED]
  Subject: tomcat and apache on separate machine
 
 
  Hi all,
 
  I need help to setup tomcat 3.2.2. and apache1.3.20 on separate
  machine!!
 
  I have done the following steps to move the apache to a new machine.
  1. move file mod_jk.conf-customized to new machine.
  2. move file workers.properties to new machine.
  3. modify httpd.conf in the new machine to point to file
  mod_jk.conf-customized.
  4. modify mod_jk.conf-customized to point the file worker.properties.
  5. modify workers.properties, change the value of
  worker.remotetomcat.host to the ip of tomcat machine.
  6. I suppose there is no changes required for server.xml in tomcat
  machine.
 
  When I tried to access URL http://apachehost/examples/servlets, I got
  error message 404.  It seems that it was trying to access the
  directory
  in the apache machine.
 
  Anything  I am missing?
 
 
  mod_jk.conf-customized
  =
  LoadModule jk_module modules/mod_jk.dll
 
  JkWorkersFile d:/apache/conf/workers.properties
  JkLogFile d:/apache/logs/mod_jk.log
  JkLogLevel error
  JkMount /*.jsp ajp12
  JkMount /servlet/* ajp12
 
  #
  # Auto configuration for the /examples context starts.
  #
 
  #
  # The following line makes apache aware of the location of
  the /examples
 
  context
  #
  Alias /examples d:/tomcat/webapps/examples
  Directory d:/tomcat/webapps/examples
  Options Indexes FollowSymLinks
  /Directory
 
  #
  # The following line mounts all JSP files and the /servlet/ uri to
  tomcat
  #
  JkMount /examples/servlet/* ajp13
  JkMount /examples/*.jsp ajp13
 
  workers.properties
  =
  worker.list=ajp12, ajp13
  worker.ajp12.port=8007
  worker.ajp12.host=xx.xx.xxx.xx   - ip of tomcat machine
  worker.ajp12.type=ajp12
  worker.ajp12.lbfactor=1
 
  worker.ajp13.port=8009
  worker.ajp13.host=xx.xx.xxx.xx  - ip of tomcat machine
  worker.ajp13.type=ajp13
  worker.ajp13.lbfactor=1
 
  Ada.
 
 
 
  --
  To unsubscribe:   mailto:[EMAIL PROTECTED]
  For additional commands: mailto:[EMAIL PROTECTED]
  Troubles with the list: mailto:[EMAIL PROTECTED]
 

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


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




TC4.0.1 - 500 error-page not working

2001-10-26 Thread Brett Porter

Hi,

I've implemented a JSP page for handling 500 errors, but its not 
working. A similar page works fine for 404 errors coming from Tomcat. 
The error in question is a NullPointerException, but this shouldn't matter.

 From web.xml:
  error-page
error-code500/error-code
location/system/error_docs/server.jsp/location
  /error-page
  error-page
error-code404/error-code
location/system/error_docs/filenotfound.jsp/location
  /error-page

The jsp's use templates. Is it just the case 500's don't work with JSP's?

Searching the mail archive for a similar topic only revealed information 
about how to do it from the servlet spec., which is what I used to 
achieve this.

Thanks,
Brett





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





WARP plugin status at 4.0.1 - README on server

2001-10-23 Thread Brett Porter

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.

I've noticed that if you start tomcat after apache, you must restart 
apache to recognise that the container is started.

Are there any other situations like this? It appears restarting tomcat 
without restarting tomcat is fine.
We would like to have monitors that automatically restart the server if 
it is hung, and want to be careful that it doesn't get in a condition 
where it might start apache without tomcat running.

Regards,
Brett




Re: automatic shutdown from servlet.init() that is load-on-startup

2001-10-22 Thread Brett Porter

I realise this isn't very well-behaved, but any others will probably be 
dealing with the same problems. At this point in time there is only one 
web application.

Perhaps there is another solution - eg send an email on failure and get 
an administrator to check in on the problem.

Cheers,
Brett

E B wrote:

Do you mean a webapp should be able to stop the
appserver tomcat ?
If this is what you wanted, then will other webapps be

happy with this ?



 --- Brett Porter [EMAIL PROTECTED] wrote: 
Hi,

I saw a message a while back on this, but don't
remember a solution and 
failed to find it in the archives.

I am looking to shutdown Tomcat 4 if a set of
initialisation functions 
fail. These functions are in the init() method of a
servlet that is set 
to load on startup (the first).

Throwing a ServletException doesn't stop Tomcat, and
I tried calling 
Bootstrap.main( new String[] { stop } ); but that
didn't unbind it 
from the port either (it didn't give me any log
messages either, but it 
did prevent anything executing after that :)

Thanks,
Brett Porter

 



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







automatic shutdown from servlet.init() that is load-on-startup

2001-10-21 Thread Brett Porter

Hi,

I saw a message a while back on this, but don't remember a solution and 
failed to find it in the archives.

I am looking to shutdown Tomcat 4 if a set of initialisation functions 
fail. These functions are in the init() method of a servlet that is set 
to load on startup (the first).

Throwing a ServletException doesn't stop Tomcat, and I tried calling 
Bootstrap.main( new String[] { stop } ); but that didn't unbind it 
from the port either (it didn't give me any log messages either, but it 
did prevent anything executing after that :)

Thanks,
Brett Porter