Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>And what do you recommend?</p> </blockquote> <p>Define it in JNDI, but outside of your web application/WAR. In Tomcat, you can do this by putting it in the ${CATALINA_BASE}/conf/context.xml file. This allows external resource (mail, database etc) configuration to be defined outside of your web application, avoiding the need to repackage your WAR when you database configuration changes, or you move to a different environment with a different database, for instance.</p> <blockquote> <p>I do the context look up in singleton Class called mailer.</p> </blockquote> <p>This mailer class, is it in WEB-INF/classes, or a JAR within WEB-INF/lib? Or is it defined elsewhere in your classpath? If the latter, you may want to consider moving it into your application.</p> <hr> <p>Edit: Based on your latest findings, it looks like your web app's META-INF/context.xml is not taking effect. There are several scenarios in Tomcat that will lead to this. I don't know these in detail, but here are some information I was able to find:</p> <p>Per - <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/host.html" rel="nofollow noreferrer">http://tomcat.apache.org/tomcat-5.5-doc/config/host.html</a></p> <p>If the "deployXML" attribute is set to false in your Host element (I believe in server.xml).</p> <blockquote> <p>deployXML - Set to false if you want to disable parsing the context.xml file embedded inside the application (located at /META-INF/context.xml). Security consious environments should set this to false to prevent applications from interacting with the container's configuration. The administrator will then be responsible for providing an external context configuration file, and put it in $CATALINA_HOME/conf/[enginename]/[hostname]/. The flag's value defaults to true.</p> </blockquote> <p>Per - <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/context.html" rel="nofollow noreferrer">http://tomcat.apache.org/tomcat-5.5-doc/config/context.html</a></p> <p>If you have the $CATALINA_HOME/conf/[enginename]/[hostname]/[context-path].xml file defined.</p> <p>I'm sure there are others, these are just the ones I was able to find quickly.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload