Re: Precompiling JSPs while deploying the application in Tomcat
Thishttp://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html#Production_Configurationmight help you. On Tue, Dec 10, 2013 at 3:28 PM, Tapajyoti Roybarman tapajyoti.roybar...@tcs.com wrote: Hi Team, Is there any Tomcat setting through which all the JSPs available in my package will get compiled while I deploy the application. Normally a JSP gets compiled while it is being requested and gets collected inside Work folder. I want that all the JSPs in my package should get compiled while the deployment process. Tomcat Version - apache-tomcat-7.0.27 OS - Windows 7 Thanks in advance. Best Regards, Tapajyoti Roy Barman Mailto: tapajyoti.roybar...@tcs.com =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Re: Configure Tomcat Logging Programmatically
Hi, Calling tomcat.setSilent(false) might help. Just try this and see if this helps. Below is small funcation from Tomcat class. /** * Controls if the loggers will be silenced or not. * @param silentcodetrue/code sets the log level to WARN for the * loggers that log information on Tomcat start up. This * prevents the usual startup information being logged. * codefalse/code sets the log level to the default * level of INFO. */ public void setSilent(boolean silent) { for (String s : silences) { if (silent) { Logger.getLogger(s).setLevel(Level.WARNING); } else { Logger.getLogger(s).setLevel(Level.INFO); } } } On Mon, Dec 9, 2013 at 11:16 AM, Matthew Westwood-Hill matthew.westwood-h...@nuix.com wrote: I am running Tomcat programmatically (embedded) and I wanted to configure its logging so I can track inbound request. I start Tomcat as follows: tomcat = new Tomcat(); tomcat.setBaseDir(DEFAULT_BASE_DIR); tomcat.getService().addConnector(defaultConnector); tomcat.setConnector(defaultConnector); tomcat.init(); tomcat.start(); How do I go about configuring the logging? Cheers, Matt
Re: Setting unloadDelay within embedded Tomcat
unloadDelay property is specific to a web application deployed on the the tomcat. A web application is represented by Context type. What you can do is get a reference to the concerned webapp deployed on tomcat and then set the property. You can do something like below Container ctx = tomcat.getHost().findChild(contextPath); //tomcat is variable from your code and contextPath is of your webapp Context context = (Context)ctx; context.setUnloadDelay(yourValue); On Mon, Dec 9, 2013 at 11:22 AM, Matthew Westwood-Hill matthew.westwood-h...@nuix.com wrote: I am running Tomcat embedded via something like the following code: tomcat = new Tomcat(); tomcat.setBaseDir(DEFAULT_BASE_DIR); tomcat.getService().addConnector(defaultConnector); tomcat.setConnector(defaultConnector); tomcat.init(); tomcat.start(); How do I go about setting the *unloadDelay* property programmatically in the above example? Cheers, Matthew