Re: Context path from ServletContextListener

2011-05-25 Thread Mateu Yabar
Sorry, I don't see how I did not see it: arg0.getServletContext().getContextPath() On 25 May 2011 10:53, Mateu Yabar wrote: > Hi to all, > > I've created a ServletContextListener, which needs to use get the current > context path (as defined in web.

Context path from ServletContextListener

2011-05-25 Thread Mateu Yabar
Hi to all, I've created a ServletContextListener, which needs to use get the current context path (as defined in web.xml): public class UpdateExecutionStartContextListener implements javax.servlet.ServletContextListener{ @Override public void contextInitialized(ServletContextEvent

RE: JNDI not available from ServletContextListener

2010-07-30 Thread Martin Gainty
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: mitch...@intertrust.com > To: users@tomcat.apache.org > Date: Thu, 29 Jul 2010 20:58:52 -0700 > Subject: RE: JNDI not available from ServletContextListener > > I

Re: JNDI not available from ServletContextListener

2010-07-30 Thread Pid
kind of > deployment problem. Do you mind explaining what the problem was, in case we come across it again? p > Thanks, case closed, > --Steve > > From: Steve Mitchell > Sent: Thursday, July 29, 2010 5:49 PM > To: 'users@tomcat.apache.org' > Subject: JNDI not a

RE: JNDI not available from ServletContextListener

2010-07-29 Thread Steve Mitchell
From: Steve Mitchell Sent: Thursday, July 29, 2010 5:49 PM To: 'users@tomcat.apache.org' Subject: JNDI not available from ServletContextListener Can anybody reproduce the bug I'm getting in Tomcat 6.0.29, or is it just me? I'm trying to access a DataSource via JNDI from a

JNDI not available from ServletContextListener

2010-07-29 Thread Steve Mitchell
Can anybody reproduce the bug I'm getting in Tomcat 6.0.29, or is it just me? I'm trying to access a DataSource via JNDI from a ServletContextListener. I find that my InitialContext has no bindings at all in the ServletContextListener.contextInitialized() method. It makes no

Re: ServletContextListener Query

2008-03-31 Thread Sparecreative
.jsp, etc.) is messed up, or the time is set wrong on the > server. > If you don't want automatic reloading to happen at all, remove > reloadable=true from the element. > -- > Len > > -- View this message in context: http://www.nabble.com/ServletContextListener-Que

Re: ServletContextListener Query

2008-03-31 Thread Len Popp
]> wrote: > > The original formatting was all screwed up. My apologies. > > > > I'm seeing an issue when using a ServletContextListener on Tomcat 6.0.13. > Tomcat is triggering the contextInitialized method at startup but then > shortly after fires off the contextDestro

Re: ServletContextListener Query

2008-03-30 Thread Sparecreative
Thanks Martin, But I'm not sure how spring can be the issue as it hasn't yet been initialized. It's listener gets called after the ServletContextListener is initialized. In my web xml I don't define the spring servlet. I just define the

Re: ServletContextListener Query

2008-03-30 Thread Martin Gainty
-on-startup parameter a.. BEA WebLogic up to 8.1 SP2 b.. IBM WebSphere 5.x c.. Oracle OC4J 9.0.3 Anyone else? Martin- - Original Message - From: "Sparecreative" <[EMAIL PROTECTED]> To: Sent: Saturday, March 29, 2008 9:30 PM Subject: Re: ServletContextListener Query

Re: ServletContextListener Query

2008-03-29 Thread Sparecreative
The original formatting was all screwed up. My apologies. I'm seeing an issue when using a ServletContextListener on Tomcat 6.0.13. Tomcat is triggering the contextInitialized method at startup but then shortly after fires off the contextDestroyed method, followed by the contextInitialized

ServletContextListener Query

2008-03-29 Thread Sparecreative
I'm seeing an issue when using a ServletContextListener on Tomcat 6.0.13. Tomcat is triggering the contextInitialized method at startup but then shortly after fires off the contextDestroyed method, followed by the contextInitialized again. Is this normal behaviour or have I screwed somethi

RE: ServletContextListener

2007-06-10 Thread Lakshmi Venkataraman
-Original Message- From: lightbulb432 [mailto:[EMAIL PROTECTED] Sent: Saturday, June 09, 2007 10:30 AM To: users@tomcat.apache.org Subject: ServletContextListener >Can requests potentially arrive at a servlet before the ServletContextListener's contextInitialized method has &g

Re: ServletContextListener

2007-06-09 Thread Pid
lightbulb432 wrote: Can requests potentially arrive at a servlet before the ServletContextListener's contextInitialized method has completed? I ask because the method occurs as a notification once the servlet context is ready to accept requests. Is there a chance, then, that a request could begin

ServletContextListener

2007-06-09 Thread lightbulb432
an be used to serve this function? -- View this message in context: http://www.nabble.com/ServletContextListener-tf3894944.html#a11042104 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-m

Re: webapp, ServletContextListener and log files

2007-02-06 Thread Hugues Ferland
on a Debian Linux. I have a context defined and want all of its logging to be in its own logfile. The first thing I tried is to modify the file logging.properties, in the conf directory of my Tomcat installation, adding a handler for my new context. This looked good until I added a ServletCont

webapp, ServletContextListener and log files

2007-02-05 Thread Hugues Ferland
. This looked good until I added a ServletContextListener. Now what is logged during the execution of the method contextInitialized, is written to catalina_.log (the logfile defined in the Tomcat startup script). I'd like that to be logged in the same logfile as the rest of the conte

Re: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-09 Thread Vasiliy Keretsman
t spring context. But it didn't help either [Loaded org.apache.log4j.spi.NullWriter from file:/home/vasya/prj/trunk/WEB-INF/lib/jakarta-log4j.jar] - Error configuring application listener of class enCode.util.spring.WebApplicationContextSupport java.lang.NoClassDefFoundError: javax/servlet/S

RE: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Caldarale, Charles R
> From: Vasiliy Keretsman [mailto:[EMAIL PROTECTED] > Subject: Re: java.lang.NoClassDefFoundError: > javax/servlet/ServletContextListener > > I manually added servlet-api.jar to CLASSPATH at first and Tomcat > started without errors. You've got something else going

Re: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Vasiliy Keretsman
That makes no sense at all, since there are no javax.* classes in tools.jar. The only thing that Tomcat might use out of tools.jar is the javac classes, and then only if you configure it to use javac instead of the default compiler. I know it looks strange. I manually added servlet-api.jar to C

RE: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Caldarale, Charles R
> From: Vasiliy Keretsman [mailto:[EMAIL PROTECTED] > Subject: Re: java.lang.NoClassDefFoundError: > javax/servlet/ServletContextListener > > Linux version of catalina/bin/setclasspath.sh in 5.5.15,17,20 hides > the following classpath setting under condition. With tools.jar

Re: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Vasiliy Keretsman
Hi! The problem was solved. Linux version of catalina/bin/setclasspath.sh in 5.5.15,17,20 hides the following classpath setting under condition. With tools.jar in classpath it works. if [ "$1" = "debug" -o "$1" = "javac" ] ; then CLASSPATH="$JAVA_HOME"/lib/tools.jar fi Btw, setclasspath.bat d

Re: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Vasiliy Keretsman
Martin, Chuck Thanks for reply. 1. servlet-api.jat is only in tomcat/common/lib 2. cut from web.xml Can we see the web.xml listener element configuration for ServletContextListener and any listener's deriving from ServletContextLis

Re: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Martin Gainty
Vasily- Can we see the web.xml listener element configuration for ServletContextListener and any listener's deriving from ServletContextListener have you verified your $CATALINA_HOME/commons/lib/servlet-api.jar is the same as the OS specific distro jar? Anyone else? M- This e-mail communic

RE: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Caldarale, Charles R
> From: Vasiliy Keretsman [mailto:[EMAIL PROTECTED] > Subject: java.lang.NoClassDefFoundError: > javax/servlet/ServletContextListener > > - Error configuring application listener of class > myapp.util.WebApplicationContextSupport > java.lang.NoClassDefFoun

java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener

2006-11-08 Thread Vasiliy Keretsman
Hi! I've got the following problem during Tomcat 5.5.20 startup - Error configuring application listener of class myapp.util.WebApplicationContextSupport java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener servlet-api.jar is in common/lib. I've never had such pr

Tomcat 5.5.20 doesnot load ServletContextListener in tld?

2006-10-23 Thread Templar Cain
the tld files and it should be loaded automatically. So I tried to put a customized ServletContextListener in a tld file packed in a jar file and it is not loaded either. And tomcat 5.5.20 seams not to be compatible with eclipse wtp 1.5.1 well, I would really like they could work things out. So does

RE: HSQLDB and Tomcat ServletContextListener

2006-09-21 Thread Awaneesh Shatmanyu
Also for you information ...the auto-commit of HSQLDB is off by default. -Original Message- From: Awaneesh Shatmanyu [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 8:15 PM To: Tomcat Users List Subject: RE: HSQLDB and Tomcat ServletContextListener Hi Feris, I am

RE: HSQLDB and Tomcat ServletContextListener

2006-09-21 Thread Awaneesh Shatmanyu
, Awaneesh Shatmanyu -Original Message- From: Feris Thia [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 7:55 PM To: Tomcat Users List Subject: HSQLDB and Tomcat ServletContextListener Dear All, I'm using HSQLDB as embedded in-process mode for my web application. I

HSQLDB and Tomcat ServletContextListener

2006-09-21 Thread Feris Thia
mport javax.servlet.ServletContextEvent; import java.nio.channels.ClosedByInterruptException; import java.sql.Connection; import java.sql.DriverManager; import java.util.Random; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class ContextStartUp implements ServletContextLis

Re: JNDI context in ServletContextListener

2006-09-08 Thread Mark Thomas
bhaskar wrote: === > > Does it mean that it will solve my problem if I move from Tomcat 5.0.x to > Tomcat 5.5 ? Probably. It it is a bug there is a much greater chance of it getting fixed in 5.5.x than 5.0.x. Mark

RE: JNDI context in ServletContextListener

2006-09-07 Thread bhaskar
; From: bhaskar [mailto:[EMAIL PROTECTED] > Sent: Friday, September 08, 2006 10:48 AM > To: users@tomcat.apache.org > Subject: JNDI context in ServletContextListener > > Hi, > I am using tomcat 5.0.18. Our application is doing the JNDI > lookup in the listener. During tomcat start

JNDI context in ServletContextListener

2006-09-07 Thread bhaskar
Hi, I am using tomcat 5.0.18. Our application is doing the JNDI lookup in the listener. During tomcat startup when i try to get the db connection, i get following error: Name OracleDev not bound to this context This is not consistent but it happens quite often. In the tomcat-user list, i found

ServletContextListener: NoClassDefFoundError

2006-02-03 Thread Joshi, Rahul R
Hi, I am using Tomcat-5.5.8 on Cygwin. I have written my own ContextListener class (called ApplicationStart) that implements ServletContextListener. The class is compiled and is present in my WEB-INF/classes folder in the proper package. When I start Tomcat, I get the following error

Re: ServletContextListener - how to detect http path of web application?

2005-12-22 Thread Frank W. Zammetti
[EMAIL PROTECTED] wrote: One reason a filter would be better is you can fully construct the URL dynamically, including the method and all that. Could you possibly map it to just the initial entry point of your app so that it doesn't fire with each request? Yeah I thought about that... unfor

RE: ServletContextListener - how to detect http path of web application?

2005-12-22 Thread Iain.Shepherd
Frank, > > Martin, I can't get a HttpServletRequest from Filter.init. > > I can get a ServletContext... but I can also get that from a > > ServletContextListener. So I can throw away this silly Filter now. > > One reason a filter would be better is you can fully &g

RE: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread James McGill
> Subject: Re: ServletContextListener - how to detect http path of web > application? We have a similar sounding problem. We want a ContextListener to be able to determine the http path and the port, in order to advertise webapps via ZeroConf MDNS (Rendezvous, Bonjour, whatever th

RE: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Frank W. Zammetti
et that from a > ServletContextListener. > So I can throw away this silly Filter now. One reason a filter would be better is you can fully construct the URL dynamically, including the method and all that. Could you possibly map it to just the initial entry point of your app so that it doesn't fire wi

RE: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Iain.Shepherd
Frank, your solution (using the ServletContext) does work. Thanks. Martin, I can't get a HttpServletRequest from Filter.init. I can get a ServletContext... but I can also get that from a ServletContextListener. So I can throw away this silly Filter now. Cheers everyone. -Original Me

Re: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Martin Gainty
Iain- Unless of course you only make this assignment in the init method Thanks, Martin- - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Wednesday, December 21, 2005 12:17 PM Subject: RE: ServletContextListener - how to detect http path of web application? Thanks, I mig

RE: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Iain.Shepherd
solution :-) Iain -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: 21 December 2005 17:00 To: Tomcat Users List Cc: Tomcat Users List Subject: Re: ServletContextListener - how to detect http path of web application? Tim is right, you can't do it directly. You *

Re: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Frank W. Zammetti
Tim is right, you can't do it directly. You *might* be able to construct it in a roundabout way though... Let's assumg you know the method, http vs. https, and its always one or the other. Let's also assume that the element in web.xml names the application context (i.e., if the URL is http://my

RE: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Iain.Shepherd
Thanks Tim. -Original Message- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: 21 December 2005 11:23 To: Tomcat Users List Subject: Re: ServletContextListener - how to detect http path of web application? There is no way to detect the contextPath on servletInit. It can only be done

Re: ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Tim Funk
There is no way to detect the contextPath on servletInit. It can only be done after the first request. (Using HttpServletRequest.getContextPath()) -Tim [EMAIL PROTECTED] wrote: Hi, Apols for a newbie question, I didn't have much luck with the archives or in Google. In my ServletContextListe

ServletContextListener - how to detect http path of web application?

2005-12-21 Thread Iain.Shepherd
Hi, Apols for a newbie question, I didn't have much luck with the archives or in Google. In my ServletContextListener.contextInitialized method, I need to detect the public http path of my web app. i.e. http://servername/approot/ How can I do this? event.getServletContext().getResource("/") give

RE: reading file in ServletContextListener

2005-11-28 Thread GB Developer
er [mailto:[EMAIL PROTECTED] > Sent: Monday, November 28, 2005 11:28 AM > To: 'Tomcat Users List' > Subject: RE: reading file in ServletContextListener > > would work, but where "/" is (without the getRealPath part) > is "the directory from which To

RE: reading file in ServletContextListener

2005-11-28 Thread GB Developer
ve, 'context' would be obtained: ServletContext context = servletContextEvent.getServletContext(); > -Original Message- > From: Werner van Mook [mailto:[EMAIL PROTECTED] > Sent: Sunday, November 27, 2005 4:32 PM > To: Tomcat Users List > Subject: Re: reading file

Re: reading file in ServletContextListener

2005-11-27 Thread Wendy Smoak
t in WEB-INF/classes (or in a .jar file in WEB-INF/lib.) I have a .properties file in WEB-INF/classes that gets read from a ServletContextListener by way of a Factory that does this: Properties props = new Properties(); ClassLoader cl = UniSessionFactory.class.getCla

Re: reading file in ServletContextListener

2005-11-27 Thread Werner van Mook
trying to start. And see there we have a chicken and egg problem. The web app needs the file to start. The file is not there if there is no web app. On Nov 27, 2005, at 11:06 PM, Wendy Smoak wrote: On 11/27/05, Werner van Mook <[EMAIL PROTECTED]> wrote: In my class which implements Servl

Re: reading file in ServletContextListener

2005-11-27 Thread Wendy Smoak
On 11/27/05, Werner van Mook <[EMAIL PROTECTED]> wrote: > In my class which implements ServletContextListener I try to read a > file. > it looks like : > parser.parse("friends.xml"); > > When I start tomcat 5.5.12 I get a FileNotFound Exception on the >

reading file in ServletContextListener

2005-11-27 Thread Werner van Mook
Hi, In my class which implements ServletContextListener I try to read a file. it looks like : parser.parse("friends.xml"); When I start tomcat 5.5.12 I get a FileNotFound Exception on the friends.xml file. The file is in the root of my web-app. I also tried "/friends.x