Re: tuning to accommodate Apache 2.4 event mpm

2017-04-27 Thread John Cartwright - NOAA Federal
k Thomas wrote: > On 27/04/17 17:47, John Cartwright - NOAA Federal wrote: >> Hello All, >> >> We recently switched to Apache 2.4 and it's event mpm and are now >> finding that some of our Tomcat 7 webapps are failing sporadically >> when accessed via Apache -

tuning to accommodate Apache 2.4 event mpm

2017-04-27 Thread John Cartwright - NOAA Federal
Hello All, We recently switched to Apache 2.4 and it's event mpm and are now finding that some of our Tomcat 7 webapps are failing sporadically when accessed via Apache - generally reporting 503s back to the browser. The webapps work reliably when accessed directly from Tomcat. We're using mod_j

Re: using log4j in a webapp using embedded tomcat

2014-01-28 Thread John Cartwright - NOAA Federal
Thanks for your reply Chris. On Mon, Jan 27, 2014 at 12:40 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > Are you running one and only one webapp in your Tomcat instance? If > not, then the system property will override it for all webapps, which > will probably cause confusion (

using log4j in a webapp using embedded tomcat

2014-01-25 Thread John Cartwright - NOAA Federal
Hello All, I have a simple program which uses embedded-tomcat (7.0.50) to host a WAR file. The webapp is using log4j and logs correctly when run inside a standard tomcat container. However, when hosted by the embedded-tomcat, the log4j configuration does not appear to be found. I'm specifying a

Re: running packed WAR files with embedded tomcat

2014-01-22 Thread John Cartwright - NOAA Federal
> > > > > > 2014/1/22 Valery Shyshkin > > > >> Try: > >> > >> File baseDir = new File(System.getProperty("java.io.tmpdir")); > >> tomcat.addContext("", baseDir.getAbsolutePath()); > >> > >> > >> > &

Re: running packed WAR files with embedded tomcat

2014-01-21 Thread John Cartwright - NOAA Federal
Thanks for the suggestion Valery, but swapping the arguments doesn't work. --john On Tue, Jan 21, 2014 at 8:12 AM, Valery Shyshkin wrote: > May be tomcat.addWebapp(contextName,pathToWarFile) instead of > tomcat.addWebapp(pathToWarFile, contextName) will help yoo. > >

running packed WAR files with embedded tomcat

2014-01-20 Thread John Cartwright - NOAA Federal
Hello All, I'm trying to create a very basic embeded tomcat 7 application to host a packed WAR file. My code looks like: Tomcat tomcat = new Tomcat() tomcat.setPort(port) tomcat.setBaseDir(".") tomcat.addWebapp(pathToWarFile, contextName) It seems to work, but I'm getting an exception on startu

Re: java.net.SocketException: Too many open files

2009-06-03 Thread John Cartwright
Thanks for your reply Peter. Initially I was assuming that lsof was not showing me files on disk that were being opened and read by servlets. However, I've been unable to reproduce that in a more controlled setting. Since this system has been running for weeks w/o any modification, something

Re: java.net.SocketException: Too many open files

2009-06-03 Thread John Cartwright
Thanks for your suggestions Martin, I'll look into modifying the memory parameters. Strange thing is that this has been running for weeks w/o any changes in the configuration or contexts. --john Martin Gainty wrote: Here is the code void acceptConnections() { if( log.isDebugEnab

Re: JSP: "No suitable driver found"

2009-04-13 Thread John Cartwright
Thank you for your prompt reply Martin and for your suggestion. Given that I have the ojdbc14.jar in the WEB-INF/lib, doesn't that the version of the OracleDriver suitable for jdk 1.4+? It *seems* like it started working when I replaced jstl-1.2.jar w/ jstl-1.1.2.jar - does that make any sens

JSP: "No suitable driver found"

2009-04-13 Thread John Cartwright
Hello All, I have what should be a simple problem, but can't seem to resolve it. Basic JSP using a non-pooled connection: I'm getting the exception: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No su

Re: strange problem w/ connection pool and Oracle

2009-02-12 Thread John Cartwright
Thanks to all who responded. Chuck seemed to hit the nail on the head - as soon as I removed the duplicate JDBC driver from the WEB-INF/lib, the problem went away. I didn't intend to have the duplicate driver there, it was the result of omitting the provided in my pom.xml. However, I wouldn'

reading request parameter invalidates post body

2008-12-11 Thread John Cartwright
Hello All, I'm using tomcat 6.0.18 and it appears that reading a request parameter like: String param = request.getParameter("param"); causes any subsequent attempt to ready the post body to fail: while ((inputLine = reader.readLine()) != null) { sb.append(inputLine); } It doesn'

JNDI Datasource works in unpacked war, not in packed war

2008-10-16 Thread John Cartwright
Hello All, I have a problem where a Datasource is configured in META-INF/context.xml and referenced in web.xml. If I install this webapp unpacked, everything works fine. However, if I try to run this webapp as a packed war, the datasource fails giving the exception: org.apache.tomcat.dbcp.

reading POST body fails on 6.0.16, works on 6.0.14

2008-06-26 Thread John Cartwright
Hello All, I have a very simple doPost method that reads the body of a POST request. Seems to work fine on 6.0.14 but consistently fails to read the body correctly in 6.0.16. Can someone help me with what's wrong here? Thanks! -- john protected void doPost(HttpServletRequest request,

mod_jk and image/png responses

2007-04-19 Thread John Cartwright
Hello All, I have a servlet which generates and returns an PNG, setting the mimetype with setContentType("image/png"). Everything works fine when Tomcat directly handles the request. However, when using mod_jk to pass the requests through Apache, the mime type of the response seems to be lo

list of session objects associated w/ a context

2007-03-14 Thread John Cartwright
Hello All, Is there a simple way to get a list of the HttpSession objects associated w/ a particular context? I know that I can send a request to the Manager servlet, but I'm looking to get the objects themselves. I need to examine each session for a particular attribute. Thanks! -- john

maintain separate sessions for each browser tab/window

2005-11-11 Thread John Cartwright
Hello All, Does anyone have a suggestion on how to maintain a separate session for each browser tab and window? Currently the same session is shared for each frame, window, tab of a given brower instance and context. I understand that this is the way things are supposed to be, but for my ap