Re: context example

2005-05-19 Thread phil campaigne
Patrick Thomas wrote:
Hi Phil,
To answer your question directly; no, in 5 you don't need (and
shouldn't have) a context entry in the server.xml for a war file (or
any webapp for that matter). Assuming the war contains a context.xml
file in META-INF, then tomcat will use that one (it will copy it to
{TomcatHome}\conf\Catalina\hostname\WarFilename.xml and use it from
there).
Hope that clears things up.
Cheers,
Patrick
On 5/18/05, phil campaigne [EMAIL PROTECTED] wrote:
 

Hi,
I'm new to tomcat 5.0 and the use of context seems to have changed since
4.0.  I have a war that expands outside ROOT when I place it in the
webapps directory.  If I place it in the ROOT directory it doesn't.  I
also noticed that 5.0 doesn't use a context entry for ROOT.  So my
questions are:
1. do I need a context entry in server.xml for my war in the webapps
directory?
2. if yes, is there an example?
thanks,
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   

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

thanks Patrick,
I appreciate the help.
Phil

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


Tomcat manager not working

2005-05-19 Thread phil campaigne
I upgraded Tomcat from 4.1.18 to 5.0.28 and get the Tomcat home page 
(index.jsp) ok.  However, when I click on the link for the manager 
applicatiion and other applications, they result in 404 errors.
1. should I be configuring something to get the examples and manager 
applicactions working?
thanks,
Phil

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


context example

2005-05-18 Thread phil campaigne
Hi,
I'm new to tomcat 5.0 and the use of context seems to have changed since 
4.0.  I have a war that expands outside ROOT when I place it in the 
webapps directory.  If I place it in the ROOT directory it doesn't.  I 
also noticed that 5.0 doesn't use a context entry for ROOT.  So my 
questions are:
1. do I need a context entry in server.xml for my war in the webapps 
directory?
2. if yes, is there an example?
thanks,
Phil

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


Re: Validator 0.5.5 doesn't have this bug anymore (Re: OT - Beware of Firefox + HTML Validator Extension)

2005-03-14 Thread phil campaigne
Christoph Kutzinski wrote:
Good point,
I stumbled upon this, too. Thinking this was a Firefox bug, I even 
filed a bug report against it.

Note: The latest version of HTML Validator (0.5.5) fixed this bug. At 
least no more problems in my case.

greetings,
Christoph
Harry Mantheakis wrote:
I thought I should share this with any web-app developers on this list.
I recently installed the HTML Validator extension in Firefox. This 
caused
me no-end of troubles because HTML Validator (on Windows XP) was 
firing
off rogue secondary requests (!) whenever I was selecting any of my form
submit buttons.

Then I read this blog entry, and realised who the culprit was:
http://ronin.keyboardsamurais.de/evil_firefox_extensions.html
I uninstalled the HTML Validator extension and everything was fine 
again.

Kudos to the LiveHTTPHeaders extension which showed the double 
requests
being generated - though at first it made me think I had a faulty mouse!

http://livehttpheaders.mozdev.org/
HTH somebody who may be pulling their hair out.
Harry Mantheakis
London, UK
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


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

I couldn't even install the latest version of Firefox on RH 8.0 because 
it couldn't find some libraries.  I googled the problem and found a post 
stating that some of the contributing developers weren't developing on a 
fresh image and were inposing specific file permissions on those who 
downloaded firefox.  Does this make sense?  I just left it at that and 
continued to use an older version.
Phil


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


[OT] Duration between two timestamps

2005-02-22 Thread phil campaigne
Hi All,
In my java application I need to subtract two java.sql.timestamps. and I 
want to store the result as sql type interval.
But my insert statement is failing.

Does anyone know what java  type I need to use in the insert statement? 
(it must accept null values)
thanks in advance,
Phil

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Dennis Payne wrote:
If you are running Linux or Unix check the syntax for the 'nice'
command.
 

[EMAIL PROTECTED] 12-27-2004 18:55 
   

Frank W. Zammetti wrote:
 

It's interesting, Craig and I had an exchange about threads in
   

servlet 
 

containers last week... I can't find a link to the thread
   

unfortunately.
 

Anyway, the basic idea behind that don't spawn your own threads 
inside a servlet container admonishment is based more on the fact 
that it's quite easy to screw up doing so, more than it has to do
   

with 
 

virtually anything else.
You want the servlet container to manager resources for you, and you
   

 

lose that by spawning your own threads.  The container isn't aware of
   

 

the threads, so it can't control them for things like graceful 
shutdowns or simply trying to control resource utilization.  Many 
people, including me, tend to ignore that warning when the situation
   

 

warrants it, but you have to be extra-careful.
For instance, you don't under any circumstances want to hold on to 
references to response, request or session objects because you don't
   

 

manage them.  You also, unless you really have a need and know what 
your doing, want to spawn threads to handle requests at all.  Any 
threads you do spawn in a container should tend to be independent 
units of execution.  If your use case fits that description, you can
   

 

get away with it relatively safely.
That being said, spawning things like daemon threads for low-level 
behind-the-scenes type processing is generally OK, so long as you are
   

 

careful (i.e., be sure no runaway processing can occur, make sure it
   

 

will shut down gracefully, etc).  You might be able to use something
   

 

like that in this case, you'll have to decide.  If your using Struts,
   

 

you can spawn the thread from a plug-in, as I've done in the past,
   

but 
 

there are non-Struts equivalents (worse comes to worse, just do it in
   

 

a servlet.init()).  Do yourself a favor and make the thread
   

processing 
 

functional independent of your app essentially, and even make it so 
it's not aware it's running in a servlet container.  But again, 
caution is the key.  If you make it a demon thread and set it's 
priority as low as you can and be sure to not hold on to a reference
   

 

to it, I've found that works just fine under a number of app servers
   

 

on a numeber of OSs.
The bottom-line is that really that psuedo-rule is around because 
people tend to shoot themselves in the foot when using threads a bit
   

 

too often, so better to advise against getting into a situation where
   

 

you might do that.  But, if your confident in your ability, and 
believe the use case really warrants it, you CAN do it, and
   

relatively 
 

safely.
   

Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've 
done it.  I created a class that implements runnable and call its 
initialize method from a servlet init method at application startup. 
The initialize method creates a thread and sets a low priority for it.

The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).
 
1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs

with a lower priority than my application code?
Phil

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

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

Will do, thanks Dennis.
Phil

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Frank W. Zammetti wrote:
Dennis Payne wrote:
Frank,
I'm using threads and didn't know I was vulnerable.  

I'm not sure vulnerable is really the right word, but I'll go with 
it :)

Here's how I've done it.  I created a class that implements runnable 
and call its initialize method from a servlet init method at 
application startup.  The initialize method creates a thread and sets 
a low priority for it.

Roughly what I do too, except that my class extends Thread and I kick 
it off from a Struts plug-in.  Same effect though.

 The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).

Same here.  I think I wake my threads every minute though.
1. Is this what you call a daemon thread?

Nope.  If you take a peak at the javadocs for the Thread class, you'll 
see a method setDaemon(boolean).  This marks a thread as a daemon 
thread.  The difference, if I remember correctly, is that the JVM 
won't shut down until all remaining threads are daemon threads.  
Threfore, if you spawn a normal thread, you can hold up the JVM from 
shutting down properly.

This is in fact the situation I had... My Tomcat instance could never 
be properly shut down because the threads I had spawned where not 
daemon threads.  Marking them as such solved that problem.

To the best of my knowledge, being a daemon thread doesn't implicitly 
say anything about a threads priority.  I think you could have a 
daemon thread set at high priority if you wanted.  I suspect most 
daemon threads are bumped to a lower priority though, as I do.

2. Is this better done using cron?  if so how do I ensure that it runs
with a lower priority than my application code?
Phil

This is a matter of opinion, and there are some reasonable arguments 
for both points of view.

My personal opinion is that if you have some periodic process that is 
going to need portions of your system, whether it's resources 
available in the container or shared code, as you do, then a 
low-priority daemon thread spawned at application startup is a good 
approach, assuming you write it carefully and solidly.

For instance, in my case, my daemon threads do some record aging in 
the database, so to me it makes sense to share the same connection 
pool as the application itself.  I also use a number of classes and 
functions that are part of the webapp itself, and I don't like the 
idea of duplicating the code for a cron job to use (sure, could just 
be a matter of setting up a classpath to those classes, but it's an 
extra dependency, and that doesn't thrill me).

But, if these tasks were volatile in any way, or they had to run 
independently of the app itself no matter what, the cron job approach 
would probably be preferable.

As for ensuring it runs at a lower priority than your application 
code, when running via cron, that's an answer I can't give you.  I'm 
frankly a Unix newbie, more or less, so someone else out there would 
be better suited to answer that.  I think you'd have to have it run at 
a lower priority than your app server, and I'm sure there's switches 
to set priority of jobs, but I don't know them.

Frank,
I also am doing record aging.  I want to move records older than two 
minutes to a centralized server for processing.  Think of it as multiple 
data collection servers and a centralized data processing server.  I'm 
thinking that the daemon to schedule queries against the data collection 
servers should execute on the centralized server.  

I'm wonder if this form of light weight replication is a good practice. 
Does anyone have some insite on this?
Phil

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-28 Thread phil campaigne
Frank W. Zammetti wrote:
I think what you describe is probably more properly implemented as 
some sort of queueing system.  Something along the lines of setting up 
a queue on each data collection server that lazily updates the 
central server (there's other ways to structure it of course).

Otherwise, I myself would tend towards a push model, since that's 
really more in line with how most web development is done.  So, have 
the data collection servers push the records to the central server 
instead, whether queues are involved or not.

Frank, Jack,
Thanks for your thoughtful answers.  I have what I need to get started.
Phil

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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-27 Thread phil campaigne
Jukka Uusisalo wrote:
Jorge Sopena wrote:
Why is bad using own threads inside web application?
Aren't all the servlet request actually a thread in Tomcat?
I can't find a reason why it's so bad solution.

I think that comes from J2EE specs. I do not remember is threads just
forbidden but if you follow specs, you do not know and you do not have
to know how application server uses threads and controls thread 
behaviour. If portability is issue for your application, it is better to
not use threads.


In that way, you manage to have a single and independent application.
Maybe I don't know some thread behaviour in Tomcat...
After all, I have use threads in web application with tomcat :) and I 
haven't have any problems or strange thread behaviour. Sometimes whole 
concurrent programming and syncronizing my own threads causes troubles 
but nothing due tomcat.

Back to original question.
 [EMAIL PROTECTED] wrote:
I am using Tomcat4.1.30 version.
I have to develop a client application which looks in the database 
every 30
minutes,

ApplicationContextListener + Timer + TimerTask

to retrieve the status of an order and send the status to the remote 
client.
Again waits for the
The client's response and insert the repsonse back to the database.

What is that remote client? Is actually another server and your 
application is client. If so, just add client code for server in 
TimerTask (http-, web service- or whatever client).

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

All,
I am currrently using threads so I'd like to know if there is a way to 
set priorities so that an os scheduled job that hits my database won't 
take precedence over my application http requests.  How do you control 
the priority when the data access task is a separate appolication?
Phil


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


Re: How to run servlet for every 30 minutes in Tomcat 4.1.30

2004-12-27 Thread phil campaigne
Frank W. Zammetti wrote:
It's interesting, Craig and I had an exchange about threads in servlet 
containers last week... I can't find a link to the thread unfortunately.

Anyway, the basic idea behind that don't spawn your own threads 
inside a servlet container admonishment is based more on the fact 
that it's quite easy to screw up doing so, more than it has to do with 
virtually anything else.

You want the servlet container to manager resources for you, and you 
lose that by spawning your own threads.  The container isn't aware of 
the threads, so it can't control them for things like graceful 
shutdowns or simply trying to control resource utilization.  Many 
people, including me, tend to ignore that warning when the situation 
warrants it, but you have to be extra-careful.

For instance, you don't under any circumstances want to hold on to 
references to response, request or session objects because you don't 
manage them.  You also, unless you really have a need and know what 
your doing, want to spawn threads to handle requests at all.  Any 
threads you do spawn in a container should tend to be independent 
units of execution.  If your use case fits that description, you can 
get away with it relatively safely.

That being said, spawning things like daemon threads for low-level 
behind-the-scenes type processing is generally OK, so long as you are 
careful (i.e., be sure no runaway processing can occur, make sure it 
will shut down gracefully, etc).  You might be able to use something 
like that in this case, you'll have to decide.  If your using Struts, 
you can spawn the thread from a plug-in, as I've done in the past, but 
there are non-Struts equivalents (worse comes to worse, just do it in 
a servlet.init()).  Do yourself a favor and make the thread processing 
functional independent of your app essentially, and even make it so 
it's not aware it's running in a servlet container.  But again, 
caution is the key.  If you make it a demon thread and set it's 
priority as low as you can and be sure to not hold on to a reference 
to it, I've found that works just fine under a number of app servers 
on a numeber of OSs.

The bottom-line is that really that psuedo-rule is around because 
people tend to shoot themselves in the foot when using threads a bit 
too often, so better to advise against getting into a situation where 
you might do that.  But, if your confident in your ability, and 
believe the use case really warrants it, you CAN do it, and relatively 
safely.

Frank,
I'm using threads and didn't know I was vulnerable.  Here's how I've 
done it.  I created a class that implements runnable and call its 
initialize method from a servlet init method at application startup. 
The initialize method creates a thread and sets a low priority for it. 
The run method sleeps the thread and wakes it every two minutes.
A processing class contains the methods that queries the database 
(postgres).
 
1. Is this what you call a daemon thread?
2. Is this better done using cron?  if so how do I ensure that it runs 
with a lower priority than my application code?
Phil


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


Re: OFF TOPIC String to char type

2004-11-20 Thread phil campaigne
QM wrote:
On Wed, Nov 17, 2004 at 11:51:38AM -0500, phil campaigne wrote:
:  I am storing a flag in the database as type char, but it is set from a 
: web page request object as a string. I need to convert it from type 
: String to char in java.

Which DB?  For those I know, DB char != Java char.
The former describes a column with character data, whereas the latter
describes a variable that contains a single character.  So the character
conversion you're doing may be unnecessary.
: I tried String.charAt(0) which seems to convert 
: to a char type untill I assign it to a variable of type char:
: char processed = processed_string.charAt(0);
: when I execute this I get the error message: type undefined.

Please post the offending code.
btw, thanks for marking this OT.
-QM
 

Thanks QM for your response.  I found that the error was elsewhere in my 
code.  A problem with assignment of variable.
thanks,
Phil


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


OFF TOPIC String to char type

2004-11-17 Thread phil campaigne
 I am storing a flag in the database as type char, but it is set from a 
web page request object as a string. I need to convert it from type 
String to char in java. I tried String.charAt(0) which seems to convert 
to a char type untill I assign it to a variable of type char:
char processed = processed_string.charAt(0);
when I execute this I get the error message: type undefined.

Any ideas what I am doing wrong?
Thanks in advance,
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: OT: hosting recommendations?

2004-11-13 Thread phil campaigne
Ben Souther wrote:
I use assortedinternet.com.
Tomcat/postgres for 30.00 to 35.00
they might have other plans too


On Fri, 2004-11-12 at 14:34, Woodchuck wrote:
 

hihi all,
can anyone recommend hosters that are Tomcat/Java friendly and offer
private JVMs for cheap monthly cost?  (cheap to me is $0 - $20/month
range)
i went to servlets.com and visited many of the hosters on their list
but most of them seem to still have the legacy offerings that are
stingy on space and transfer allowances.  it was either that or they
charge a lot ($50+/month) for private JVMs.
thanks in advance,
woodchuck
		
__ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com


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


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

We use KGBInternet located in Canada.
Phil

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


Re: problems with LD_LIBRARY_PATH !

2004-10-29 Thread phil campaigne
Her, Andre wrote:
All,
I have ported a web application normally running on NT4 / ISS /Jrun to a
tomcat 3.3.2.
The results are mixed.
servlets seems top work OK but some of them do a call to a perl script.
The perl script is well called but
the environment LD_LIBRARY_PATH is not set, so loading of modules and
library fails.
I have tried every thing I could think of, even including a
$ENV{'LD_LIBRARY_PATH'} = /usr/lib:/usr/local/lib:/usr/local/perl/lib;
in the perl script, but still fails loading libraries *.so !!
Any idea someone !?
Many thanks in advances
Regards
Andre

Andre Her
BlarenbergLaan,2
2800 Mechelen
Belgium
Tel : +32 (0)15 78 6887
Fax: +32 (0)15 78 5405
   

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

This worked for me from the command line when I had similar problem with 
my postgresql database.

su - postgres
LD_LIBRARY_PATH=/usr/local/pgsql/lib
 export LD_LIBRARY_PATH
PATH=/usr/local/pgsql/bin:$PATH
 export PATH
regards,
Phil

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


OFF TOPIC-Starting a servlet

2004-10-11 Thread phil campaigne
I want to start my application from a start servlet called by the submit 
button and action tag in an html page.  When I press the submit button 
the url uncludes parameters such as,
StartServlet?=Run=START
which my servlet is not expecting.

Is there a way to start my servlet from an html button that does not 
pass the parameters?
Phil

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


OFF TOPIC- Starting a servlet

2004-10-11 Thread phil campaigne
Thanks Hassan,
That's what I needed. Pretty basic huh?
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: War does not unpack on deployment

2004-03-14 Thread phil campaigne
Jacob Kjome wrote:

At 06:19 PM 3/13/2004 -0500, you wrote:

Jacob,
My hosting service is Tomcat 4.18 so I'm kind of stuck with 4.x.  Are 
you saying if I use tomcat 4.x I must not put a context for my 
applicaton in server.mxl?  Then it will be unpacked automatially?
thanks,
Phil


Yep, that's exactly what I'm saying.  Or, do this...

Context path=/coolapp docBase=coolapp.war/

Now you can specify any configuration you want for your app and it 
will be deployed just fine.  It won't be unpacked.  It will run 
directly from the .war file.  Just note that you will not be able to 
use context.getRealPath(/) as it will return null if the app is 
deployed directly from the .war file and not a directory.  Of course, 
you should never depend on this anyway if you want your application to 
run under any appserver.

Also note that the above is exactly what you'd give to Tomcat5 and it 
will unpack it anyway.  The app will run from the directory, not the 
.war file even though the docBase is specified as the .war file.

Jake

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

Thanks Jake,
Good explaination.
Phil


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


Re: OT: Java Hosting

2004-03-13 Thread phil campaigne
Adam Hardy wrote:

Try kgbinternet.com.  They have very reasonable developer accounts 
with tomcat and mysql or postgresql.  They have dedicated jvm's so 
you can start and stop your own tomcat.  I have used them with good 
success. The person to talk to is
Keith Bjorndahl at [EMAIL PROTECTED]
Good luck,
Phil Campaigne

How much do you pay a month for a login with a dedicated JVM?

Adam
I pay $20 CN or about $13 US dollars for didicated jvm plus tomcat 4.18 
plus postgres 7.2. They are in Alberta Canada.
Phil



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


War does not unpack on deployment

2004-03-13 Thread phil campaigne
My application Test.waris not unpacking when I ftp it to the 
jakarta-tomcat/webapps directory on my host.  Even after stop and 
re-start.  If I mkdir Test and move test.war into it and jar -vxf 
Test.war then it does expand and run properly.

This is my server.xml entries
**
!-- Define the default virtual host --
 Host name=localhost debug=0 appBase=webapps
  unpackWARs=true autoDeploy=true
!-- Test Context --
   Context path=/Test docBase=Test
  debug=100 privileged=true/

This is my web.xml


?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
 display-nameTest/display-name
   servlet
   servlet-nameTest/servlet-name
   display-nameTest/display-name
   servlet-classcom.op.test.Test/servlet-class
   /servlet
servlet-mapping
   servlet-nameTest/servlet-name
   url-pattern/Test/url-pattern
   /servlet-mapping
 /web-app
***
Why doesn't unpack automatically?
Thanks,
Phil Campaigne
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: War does not unpack on deployment

2004-03-13 Thread phil campaigne
Rhino wrote:

I don't know why the WAR file is not unpacking automatically but I'd like to
suggest a simpler alternative than creating a directory and unjarring it
manually: use the Tomcat Manager application, specifically the Upload a WAR
file to install section.
Rhino

- Original Message - 
From: phil campaigne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 13, 2004 3:09 PM
Subject: War does not unpack on deployment

 

My application Test.waris not unpacking when I ftp it to the
jakarta-tomcat/webapps directory on my host.  Even after stop and
re-start.  If I mkdir Test and move test.war into it and jar -vxf
Test.war then it does expand and run properly.
This is my server.xml entries
**
!-- Define the default virtual host --
 Host name=localhost debug=0 appBase=webapps
  unpackWARs=true autoDeploy=true
!-- Test Context --
   Context path=/Test docBase=Test
  debug=100 privileged=true/

This is my web.xml


?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
 display-nameTest/display-name
   servlet
   servlet-nameTest/servlet-name
   display-nameTest/display-name
   servlet-classcom.op.test.Test/servlet-class
   /servlet
servlet-mapping
   servlet-nameTest/servlet-name
   url-pattern/Test/url-pattern
   /servlet-mapping
 /web-app
***
Why doesn't unpack automatically?
Thanks,
Phil Campaigne
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   



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

Rhino,
I'm using an ant buld file to create the war and deploy it so I would 
prefer to stick with that approach if I can make it work.
If I can't I try your suggestion.
thanks,
Phil



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


Re: War does not unpack on deployment

2004-03-13 Thread phil campaigne
Jacob Kjome wrote:

Just for the record, this is how it is

Tomcat4.x.x:
If one defines the context in server.xml or in a context configuration 
file, the .war file corresponding to the webapp that it refers to will 
not be unpacked.  Why this is the behavior or Tomcat4.x.x is beyond me.

Tomcat5.x.x
One should not define the context in server.xml, but in a context 
configuration file.  And in either case, the .war file will be 
unpacked no matter what.  This is what it always should have been.

Moral of the story, move off of Tomcat4.x.x and on to Tomcat5.x.x to 
get server behavior that makes sense.

Jake

At 03:47 PM 3/13/2004 -0500, you wrote:

I don't know why the WAR file is not unpacking automatically but I'd 
like to
suggest a simpler alternative than creating a directory and unjarring it
manually: use the Tomcat Manager application, specifically the 
Upload a WAR
file to install section.

Rhino

- Original Message -
From: phil campaigne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 13, 2004 3:09 PM
Subject: War does not unpack on deployment
 My application Test.waris not unpacking when I ftp it to the
 jakarta-tomcat/webapps directory on my host.  Even after stop and
 re-start.  If I mkdir Test and move test.war into it and jar -vxf
 Test.war then it does expand and run properly.


 This is my server.xml entries
 **
  !-- Define the default virtual host --
   Host name=localhost debug=0 appBase=webapps
unpackWARs=true autoDeploy=true


 !-- Test Context --
 Context path=/Test docBase=Test
debug=100 privileged=true/
 

 This is my web.xml

 
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
 PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
 http://java.sun.com/dtd/web-app_2_3.dtd;

 web-app
   display-nameTest/display-name


 servlet
 servlet-nameTest/servlet-name
 display-nameTest/display-name
 servlet-classcom.op.test.Test/servlet-class
 /servlet


  servlet-mapping
 servlet-nameTest/servlet-name
 url-pattern/Test/url-pattern
 /servlet-mapping

   /web-app
 ***
 Why doesn't unpack automatically?
 Thanks,
 Phil Campaigne


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


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


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

Jacob,
My hosting service is Tomcat 4.18 so I'm kind of stuck with 4.x.  Are 
you saying if I use tomcat 4.x I must not put a context for my 
applicaton in server.mxl?  Then it will be unpacked automatially?
thanks,
Phil



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


Re: OT: Java Hosting

2004-03-10 Thread phil campaigne
Schalk wrote:

Does anyone know of a good hosting company that hosts Java. All the
companies I have talked to seem to have some limitations, either you cannot
set-up your own custom servlet-mappings via web.xml, or the Tomcat version
is old, shared instances of Tomcat that does not allow me the freedom to
stop and start Tomcat as the need arises etc.
Any help in this regard would be much appreciated.

Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Development.Multimedia.Branding
emotionalize.conceptualize.visualize.realize
Tel: +27125468436
Fax: +27125468436
email:[EMAIL PROTECTED]
web: www.volume4.com
This message contains information that is considered to be sensitive or
confidential and may not be forwarded or disclosed to any other party
without the permission of the sender. If you received this message in error,
please notify me immediately so that I can correct and delete the original
email. Thank you. 

:: -Original Message-
:: From: Asif Chowdhary [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, March 10, 2004 7:10 PM
:: To: Tomcat Users List
:: Subject: RE: Tomcat on linux : IBM JDK 1.3.1 -
:: 
:: Thank you.
:: 
:: setting the LD_ASSUME_KERNEL=2.2.5 in the user profile works.
:: 
:: 
:: -Original Message-
:: From: Lerias, Hugo [mailto:[EMAIL PROTECTED]
:: Sent: Wednesday, March 10, 2004 11:57 AM
:: To: Lerias, Hugo; Tomcat Users List
:: Subject: RE: Tomcat on linux : IBM JDK 1.3.1 -
:: 
:: 
:: Take a look at this post:
:: http://www.linux-sxs.org/programming/ibm-java.html#APPENDIX_A
:: 
:: Cheers,
:: Hugo
:: 
:: -Original Message-
:: From: Lerias, Hugo
:: Sent: Mittwoch, 10. März 2004 17:55
:: To: 'Tomcat Users List'
:: Subject: RE: Tomcat on linux : IBM JDK 1.3.1 -
:: 
:: 
:: Are you trying to use IBM jdk 1.3 on red hat 9?
:: 
:: Hugo
:: 
:: -Original Message-
:: From: Asif Chowdhary [mailto:[EMAIL PROTECTED]
:: Sent: Mittwoch, 10. März 2004 17:42
:: To: [EMAIL PROTECTED]
:: Subject: Tomcat on linux : IBM JDK 1.3.1 -
:: 
:: 
:: Hi,
:: 
:: I am installing tomcat on RH9.
:: Tomcat version is 4.1.27 and the file is jakarta-tomcat-4.1.27.tar.gz
:: 
:: The installation works with JDK 1.4
:: 
:: but tomcat does not start when I try to use JDK 1.3.1
:: The browser returns the message Unable to connect to localhost with
:: http://localhost:8080/.
:: 
:: 
:: Any suggestions.
:: 
:: 
:: Asif
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]
:: 
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]
:: 
:: 
:: 
:: -
:: To unsubscribe, e-mail: [EMAIL PROTECTED]
:: For additional commands, e-mail: [EMAIL PROTECTED]



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

Try kgbinternet.com.  They have very reasonable developer accounts with 
tomcat and mysql or postgresql.  They have dedicated jvm's so you can 
start and stop your own tomcat.  I have used them with good success. 
The person to talk to is
Keith Bjorndahl at [EMAIL PROTECTED]
Good luck,
Phil Campaigne



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


Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
QM wrote:
: Hello,
: I want a servlet to run its init() method when I start Tomcat.  I put 
: the following entry in web.xml but that doesn't do it:
: [snip]

Please, humour me: put load-on-startup after init-param. I believe
that's the order per the servlet spec.
Humour me, part 2: verify the method signature of your servlet's init().
A small typo makes the difference between overload and override...
Other than that, some details would be nice: Tomcat version, log
messages, what have you...
On an unrelated note: is there any reason you're using load-on-startup
instead of lifecycle listeners?
-QM


QM/Liem
 thanks for your response.  I place load-on-startup entry after 
init-param entry but still doesn't fire init() method of my servlet at 
startup.

I'm using Tomcat 4.0.6, and don't know anything about listeners. Below 
is my init() method and my Tomcat startup log:

public void init(ServletConfig cf) throws ServletException {
try { System.out.println(begin PgConnectionPoolServlet init());
pool = new PgConnectionPool(org.postgresql.Driver,
jdbc:postgresql://localhost/hardwoodthunder, pcampaigne, 
, 4);
} catch (Exception e)
{
throw new UnavailableException(Couldn't create connection pool);
}System.out.println(pool created);
}
}
***

Starting service Tomcat-Standalone
Apache Tomcat/4.0.6
XmlMapper: Debug level: 3
XmlMapper: Validating = true
XmlMapper: Set locator : 
[EMAIL PROTECTED]
Resolve: -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
http://java.sun.com/dtd/web-app_2_3.dtd
  Using alternate DTD /javax/servlet/resources/web-app_2_3.dtd
XmlMapper: org.apache.catalina.core.StandardContext.setPublicId(-//Sun 
Microsystems, Inc.//DTD Web Application 2.3//EN)
XmlMapper: new org.apache.catalina.core.StandardWrapper
XmlMapper: org.apache.catalina.core.StandardWrapper.setName( default)
XmlMapper: org.apache.catalina.core.StandardWrapper.setServletClass( 
org.apache.catalina.servlets.DefaultServlet)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
debug, 0)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
listings, true)
XmlMapper: 
org.apache.catalina.core.StandardWrapper.setLoadOnStartupString( 1)
XmlMapper: Calling org.apache.catalina.core.StandardContext.addChild 
StandardWrapper[default]
XmlMapper: pop org.apache.catalina.core.StandardWrapper
XmlMapper: new org.apache.catalina.core.StandardWrapper
XmlMapper: org.apache.catalina.core.StandardWrapper.setName( invoker)
XmlMapper: org.apache.catalina.core.StandardWrapper.setServletClass( 
org.apache.catalina.servlets.InvokerServlet)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
debug, 0)
XmlMapper: 
org.apache.catalina.core.StandardWrapper.setLoadOnStartupString( 2)
XmlMapper: Calling org.apache.catalina.core.StandardContext.addChild 
StandardWrapper[invoker]
XmlMapper: pop org.apache.catalina.core.StandardWrapper
XmlMapper: new org.apache.catalina.core.StandardWrapper
XmlMapper: org.apache.catalina.core.StandardWrapper.setName( jsp)
XmlMapper: org.apache.catalina.core.StandardWrapper.setServletClass( 
org.apache.jasper.servlet.JspServlet)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
mappedfile, true)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
classdebuginfo, true)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
scratchdir, 
/home/phil/system/tomcat_ReportingSystem_d2cdd3bd/work/_scratchdir)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
keepgenerated, true)
XmlMapper: org.apache.catalina.core.StandardWrapper.addInitParameter( 
logVerbosityLevel, WARNING)
XmlMapper: 
org.apache.catalina.core.StandardWrapper.setLoadOnStartupString( 3)
XmlMapper: Calling org.apache.catalina.core.StandardContext.addChild 
StandardWrapper[jsp]
XmlMapper: pop org.apache.catalina.core.StandardWrapper
XmlMapper: org.apache.catalina.core.StandardContext.addServletMapping( 
/, default)
XmlMapper: org.apache.catalina.core.StandardContext.addServletMapping( 
/servlet/*, invoker)
XmlMapper: org.apache.catalina.core.StandardContext.addServletMapping( 
*.jsp, jsp)
XmlMapper: org.apache.catalina.core.StandardContext.setSessionTimeout( 30)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( abs, 
audio/x-mpeg)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( ai, 
application/postscript)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( aif, 
audio/x-aiff)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( 
aifc, audio/x-aiff)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( 
aiff, audio/x-aiff)
XmlMapper: org.apache.catalina.core.StandardContext.addMimeMapping( aim, 
application/x-aim)
XmlMapper: 

Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
Shapira, Yoav wrote:
Howdy,


public void init(ServletConfig cf) throws ServletException {


Either override init() instead of init(ServletConfig), or call
super.init(cf) as your first line.
As the others suggested, a ServletContextListener is not a bad place to
put this time of code either.
Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

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

Yoav,
I tried overriding init() and super.init(SerlvetConfig cf) as 1st line 
of init(ServletConfig cf) but neither worked.

I was thinnking that I should use the init() method appraoch becasue it 
is a connectionpool and I want to initially build the pool before the 
application starts to use connections.  In this case is ServletContext 
Listener appropriate?
thanks,
Phil

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


Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
Parsons Technical Services wrote:
IF, and a big one at that, the only reason, in this case, that this is
needed is the connection pool how about the JNDI for the connection pool?
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

Just a thought.

Doug

- Original Message - 
From: Larry Isaacs [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 1:06 PM
Subject: RE: Servlet won't run init()





-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 12:47 PM
To: Tomcat Users List
Subject: RE: Servlet won't run init()


Howdy,


I tried overriding init() and super.init(SerlvetConfig cf)
as 1st line

of init(ServletConfig cf) but neither worked.
Strange.  Any errors in your logs?


I was thinnking that I should use the init() method appraoch
becasue it

is a connectionpool and I want to initially build the pool before the
application starts to use connections.  In this case is
ServletContext

Listener appropriate?
Yeah, a ServletContextListener is better because:
- It will be initialized before any servlets
- It will be destroyed after any servlets (so you won't close the pool
while something is processing)
- It's not subject to recycling by the container
- You don't need to rely on servlet startup order
Yoav Shapira


A minor additional point for those interested in porability of
webapps. What Yoav cites is guaranteed in the Servlet 2.4
specifications, which applies to Tomcat 5.  It is also true for
Tomcat 4, but due to ambiquities in the Servlet 2.3 specifications,
it isn't behavior guaranteed by the spec.  A servlet container that
calls ServletContextListeners after servlet initialization isn't
in technical voilation of the Servlet 2.3 spec.
Cheers,
Larry



This e-mail, including any attachments, is a confidential
business communication, and may contain information that is
confidential, proprietary and/or privileged.  This e-mail is
intended only for the individual(s) to whom it is addressed,
and may not be saved, copied, printed, disclosed or used by
anyone else.  If you are not the(an) intended recipient,
please immediately delete this e-mail from your computer
system and notify the sender.  Thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


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

Doug,
I'll appreciate your links and will take a look at them.  Right now 
something weird is going on that would affect whatever solution I choose.
thanks,
Phil

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


Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
Shapira, Yoav wrote:
Howdy,


I tried overriding init() and super.init(SerlvetConfig cf) as 1st line
of init(ServletConfig cf) but neither worked.


Strange.  Any errors in your logs?


I was thinnking that I should use the init() method appraoch becasue it
is a connectionpool and I want to initially build the pool before the
application starts to use connections.  In this case is ServletContext
Listener appropriate?


Yeah, a ServletContextListener is better because:
- It will be initialized before any servlets
- It will be destroyed after any servlets (so you won't close the pool
while something is processing)
- It's not subject to recycling by the container
- You don't need to rely on servlet startup order
Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

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

Yoav,
Now my IDEA IDE tech is telling me he thinks the problem is that the 
init() method is running before the IDEA debugger getes a chance to 
connect to tomcat. I don't see my println(..) messages in catalina.out. 
 1. Is there another log?
2. Would I likely run into similar problems using the 
ServletContextListener approach?
thanks,
Phil

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


Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
Shapira, Yoav wrote:
Howdy,


Now my IDEA IDE tech is telling me he thinks the problem is that the
init() method is running before the IDEA debugger getes a chance to
connect to tomcat. I don't see my println(..) messages in catalina.out.
1. Is there another log?
2. Would I likely run into similar problems using the
ServletContextListener approach?


I won't venture into debugging your IDE problems.  If you have issues
when running tomcat by itself, outside an IDE, I'll be glad to help ;)
Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged.  This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender.  Thank you.

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

Yoav,
That sounds reasonable.  Thanks for your help.  I'm sure I speak for 
many others also, We'd be lost without you.
Phil

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


Re: Servlet won't run init()

2004-02-19 Thread Phil Campaigne
Parsons Technical Services wrote:
Phil,

Okay, I'll go for 4 cents and throw out another one. I do not use a pool for
my IDE. Unless you are load testing the code in the IDE then what advantage
is there to using a pool? My current setup uses a direct connection in the
IDE via DriverManager and uses the pool when deployed to TC. For me a simple
if statement chooses where to get the connection. I am not familiar with
your IDE and this may not work but again just another suggestion.
Doug

- Original Message - 
From: Phil Campaigne [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 2:39 PM
Subject: Re: Servlet won't run init()



Shapira, Yoav wrote:

Howdy,



Now my IDEA IDE tech is telling me he thinks the problem is that the
init() method is running before the IDEA debugger getes a chance to
connect to tomcat. I don't see my println(..) messages in catalina.out.
1. Is there another log?
2. Would I likely run into similar problems using the
ServletContextListener approach?


I won't venture into debugging your IDE problems.  If you have issues
when running tomcat by itself, outside an IDE, I'll be glad to help ;)
Yoav Shapira



This e-mail, including any attachments, is a confidential business

communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Yoav,
That sounds reasonable.  Thanks for your help.  I'm sure I speak for
many others also, We'd be lost without you.
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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

Thanks Doug, that may be my best bet.
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Servlet won't run init()

2004-02-18 Thread Phil Campaigne
Hello,
I want a servlet to run its init() method when I start Tomcat.  I put 
the following entry in web.xml but that doesn't do it:
 servlet
		servlet-namePgConnectionPoolServlet/servlet-name
		display-namePgConnectionPoolServlet/display-name
	 
servlet-classcom.op.reporter_manager.PgConnectionPoolServlet/servlet-class
load-on-startup1/load-on-startup
init-param
param-namedebug/param-name
param-value5/param-value
/init-param

/servlet

servlet-mapping
servlet-namePgConnectionPoolServlet/servlet-name
url-pattern/PgConnectionPoolServlet/url-pattern
/servlet-mapping
*
I will appreciate any ideas on how to fix it?
thanks,
Phil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Servlets won't load after deployment

2004-02-04 Thread Phil Campaigne
Filip Hanik (lists) wrote:
remove all that stuff from your classpath.
do this
export CLASSPATH=
./startup.sh
and it should work, the startup scripts are setting the classpath, and so
does tomcat when it startup,
you placing stuff in the system classpath will only mess things up :)
Filip

-Original Message-
From: Phil Campaigne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 6:19 PM
To: [EMAIL PROTECTED]
Subject: Servlets won't load after deployment
MY webapp works on my localhost but after deployment I get an error
instantiating HttpServlet class even though I have the servlet.jar in
the CLASSPATH.  Here are the CLASSPATH and catalina.out.
Does anyone know what I am doing wrong?
thanks,
Phil
CLASSPATH=:.:/usr/java/mysql-connector-java-2.0.14-bin.jar:/usr/java/jdbc7.2
dev-1.2.jar:/home/catalina/jakarta-tomcat/common/lib/servlet.jar:/home/hardw
oodthunder/jakarta-tomcat/common/lib/servlet.jar:/usr/java/mm.mysql-2.0.11/m
m.mysql-2.0.11-bin.jar
2004-0


2-03 18:58:51 StandardContext[/ReportingSystem]: Servlet
/ReportingSystem threw load() exception
javax.servlet.ServletException: Error instantiating servlet class
javax.servlet.http.HttpServlet
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
1)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3420)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:257)
 at
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
 at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
 at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
 at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
- Root Cause -
java.lang.InstantiationException
 at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(Instan
tiationExceptionConstructorAccessorImpl.java:30)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
 at java.lang.Class.newInstance0(Class.java:306)
 at java.lang.Class.newInstance(Class.java:259)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:90
2)
 at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3420)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
 at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:257)
 at
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
 at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
 at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
 at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:879

Which directory for web.xml?

2004-02-04 Thread Phil Campaigne
Hi All,
When an application is deployed on tomcat, which directory should 
web.xml be in?
thanks,
Phil

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


Re: Which directory for web.xml?

2004-02-04 Thread Phil Campaigne
Ian Joyce wrote:
WEB-INF/


[EMAIL PROTECTED] 02/04/04 11:44AM 

Hi All,
When an application is deployed on tomcat, which directory should 
web.xml be in?
thanks,
Phil

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



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

thanks Ian

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


error instantiating HttpServlet

2004-02-04 Thread Phil Campaigne
Hi All,
When I deploy a webapp that was working on my local machine I get the error:
2004-02-04 11:58:12 StandardContext[/ReportingSystem]: Servlet 
/ReportingSystem threw load() exception
javax.servlet.ServletException: Error instantiating servlet class 
javax.servlet.http.HttpServlet
- Root Cause -
java.lang.InstantiationException

Is there somethind I have done wrong in configuring for deployment?
thanks,
hil
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Servlets won't load after deployment

2004-02-03 Thread Phil Campaigne
MY webapp works on my localhost but after deployment I get an error 
instantiating HttpServlet class even though I have the servlet.jar in 
the CLASSPATH.  Here are the CLASSPATH and catalina.out.
Does anyone know what I am doing wrong?
thanks,
Phil

CLASSPATH=:.:/usr/java/mysql-connector-java-2.0.14-bin.jar:/usr/java/jdbc7.2dev-1.2.jar:/home/catalina/jakarta-tomcat/common/lib/servlet.jar:/home/hardwoodthunder/jakarta-tomcat/common/lib/servlet.jar:/usr/java/mm.mysql-2.0.11/mm.mysql-2.0.11-bin.jar
2004-0


2-03 18:58:51 StandardContext[/ReportingSystem]: Servlet 
/ReportingSystem threw load() exception
javax.servlet.ServletException: Error instantiating servlet class 
javax.servlet.http.HttpServlet
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:911)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:497)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

- Root Cause -
java.lang.InstantiationException
at 
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:902)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at 
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:257)
at 
org.apache.catalina.core.StandardHost.install(StandardHost.java:772)
at 
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:502)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:410)
at 
org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)

 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
at 

OFF TOPIC-incremental development

2004-01-13 Thread Phil Campaigne
I am developing a java/tomcat/postgresql application using ant and 
junit.  I want to deploy tested builds along with matching tables with 
test data in them.

What is the best way to version tables and data in the database to match 
a war file version?
thanks,
Phil

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


Re: google yourself

2003-12-13 Thread phil campaigne
Nikola Milutinovic wrote:

Ostad, James wrote:

have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.
Any one knows how they do that?


There is a web archive of this list.

Nix.

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

What if you don't want everyone in the world to know your business?
Phil


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