[Tomcat Embedded] Registering a JDBC Datasource
I am using Tomcat 5.5.15 embedded version. I have a Web application which refers to a JDBC Datasource. Can somebody tell me how to register a JNDI Datasource in the Tomcat embedded version. -- Thanks Afkham Azeez http://www.wso2.org GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
Tomcat Embedded documentation
Can somebody send me some pointers to some documentation on Tomcat embedded edition? I need to find out how JDBC datasources can be registered(or whether this can be done). -- Thanks Afkham Azeez http://www.wso2.org GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760
Embedded Tomcat - programatically adding context-params
Hi folks, We are using Embedded Tomcat in our products. Once we create a new context, we need to set some context parameters. How can this be done? I've tried using org.apache.catalina.Context#addParameter, but from within a JSP, when I try to access this parameter as application.getInitParameter("name) I'm getting null. Thanks Azeez
Re: Embedded Tomcat - programatically adding context-params
Sorted this out. You need to set the params after the context is added to the host. I was setting it before adding it to the host. Thanks Azeez On Tue, Jun 15, 2010 at 8:07 PM, Afkham Azeez wrote: > Hi folks, > We are using Embedded Tomcat in our products. Once we create a new context, > we need to set some context parameters. How can this be done? > > I've tried using org.apache.catalina.Context#addParameter, but from within > a JSP, when I try to access this parameter as > application.getInitParameter("name) I'm getting null. > > Thanks > Azeez > -- Afkham Azeez Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ email: az...@wso2.com cell: +94 77 3320919 blog: http://blog.afkham.org twitter: http://twitter.com/afkham_azeez linked-in: http://lk.linkedin.com/in/afkhamazeez Lean . Enterprise . Middleware
Re: Undeploying webapp programatically
Hi, I'm using embedded Tomcat 5.5.23. I undeploy the webapps programmatically using the following code segment: host.removeChild(context); Now, when I send a request to the context which was undeployed, I get an HTTP 503. But I expect to get an HTTP 404 since that resource is not actually available. It seems that the webapp is not completely getting undeployed. What should I do to completely undeploy the webapp so that I get a 404 when a request to the undeployed webapp is made? Thanks Azeez -- Afkham Azeez Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ email: az...@wso2.com cell: +94 77 3320919 blog: http://blog.afkham.org twitter: http://twitter.com/afkham_azeez linked-in: http://lk.linkedin.com/in/afkhamazeez Lean . Enterprise . Middleware - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Undeploying webapp programatically
I was able to resolve this. It may be helpful for somebody looking for this information. After calling host.removeChild(context), you need to call, ((StandardContext)context).destroy(); Only when destroy is called the context gets completely removed. Thanks Azeez On Wed, Jul 7, 2010 at 7:12 PM, Mark Thomas wrote: > On 07/07/2010 14:26, Afkham Azeez wrote: >> Hi, >> I'm using embedded Tomcat 5.5.23. I undeploy the webapps >> programmatically using the following code segment: >> >> host.removeChild(context); >> >> Now, when I send a request to the context which was undeployed, I get >> an HTTP 503. But I expect to get an HTTP 404 since that resource is >> not actually available. It seems that the webapp is not completely >> getting undeployed. What should I do to completely undeploy the webapp >> so that I get a 404 when a request to the undeployed webapp is made? > > Those are all questions for the users list, not the dev list. > > Mark > > - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org