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 Shapira, Yoav

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]



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 Shapira, Yoav

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]



RE: Servlet won't run init()

2004-02-19 Thread Larry Isaacs


 -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]



Re: Servlet won't run init()

2004-02-19 Thread Parsons Technical Services
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]



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 Shapira, Yoav

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]



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 Tony Nakamura
I apologize for my last empty message...wrong window.
I didn't have the tags at the correct place in the WEB-INF\web.xml file.
I placed them in the correct places, but I'm just back to square-one.
I have the following entries, but I am still getting the 500 error page with
java.io.FileNotFoundException generated by Tomcat.

error-page
error-code404/error-code
location/404.html/location
/error-page
error-page
   exception-typejava.io.FileNotFoundException/exception-type
   location/500.jsp/location
/error-page
error-page
   error-code500/error-code
   location/500.jsp/location
/error-page


???

Thanks,


Tony


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



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]




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

Re: Servlet won't run init()

2004-02-19 Thread Parsons Technical Services
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]



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]


Re: Servlet won't run init()

2004-02-18 Thread QM
: 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


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



Re: Servlet won't run init()

2004-02-18 Thread Liem Do
Put the load-on-startup tags after the init-param tags.


- Original Message - 
From: Phil Campaigne [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 18, 2004 4:30 PM
Subject: Servlet won't run init()


 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-clas
s
  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]




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