tomcat6

Tomcat - want to clear cache of app being undeployed

醉酒当歌 提交于 2019-12-01 03:40:43
问题 I've got Tomcat6 running on my Ubuntu server 14.04 minimal platform and had deployed a .war file. However, things did not go right during the initial setup of the app and I'm trying to undeploy the app from tomcat manager. Unfortunately when I re-deploy the app and start it, the previous install comes up. How can I get a fresh install of the app? (I've also tried "reload" but no luck) Thanks in anticipation. 回答1: In Tomcat you have a folder called "work". Go to <TOMCAT_HOME>/work/Catalina/

does maxPostSize apply to multipart/form-data file uploads

为君一笑 提交于 2019-12-01 03:28:04
I have a webapp on a Tomcat server that allows files to be uploaded. There is a limit on the size of a file upload, and I'd like that limit to be enforced preemptively (ie, once you cross the limit, the file upload fails, rather than transferring the whole file, checking that it's too big and then sending an error). I tried to do this by add maxPostSize="1000" to the connector section in the relevant connector in server.xml, but I can still upload larger files. I've seen a post indicating that maxPostSize only works for a specific content type. So my question is whether what I'm doing is

Custom Tomcat Valve contained in web app WAR file

◇◆丶佛笑我妖孽 提交于 2019-12-01 02:23:33
问题 I'm looking to implement a custom Valve and configuring it using META-INF/context.xml. At the moment though, when context.xml is parsed during deployment, Tomcat (6.0.32) dies with a ClassNotFoundException on my custom Valve implementation. I'm under the impression that I'm running into a class loading context issue and I'm not 100% sure I understand it. Is my class not found because it is located in the WEB-INF/classes file and the Context level class loader is unable to locate the class

Where does Tomcat append / to directory paths?

拟墨画扇 提交于 2019-11-30 20:47:44
Suppose my Tomcat webapps directory looks like this: webapps/ webapps/fooapp/ webapps/fooapp/WEB-INF/ webapps/fooapp/WEB-INF/web.xml webapps/fooapp/bardir/ When I make a GET request for /fooapp/bardir , Tomcat sees that webapps/fooapp/bardir is a directory and sends back a 302 to /fooapp/bardir/ (with a slash at the end). Here is my question: Where in the Tomcat source code does this take place? (I'm looking at 6.0.x but a correct answer for any version would be a great starting point.) The only reference material I can find on this subject is in the Catalina Functional Specifications which

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

隐身守侯 提交于 2019-11-30 18:42:29
Am working on web Services... and am a beginner, Am trying to get Oracle Db connection in a service File and am getting below error: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at DatabaseConnection.shamDBConn.getShamStage(shamDBConn.java:25) at lineItemPrice.itemDetails.getUserId(itemDetails.java:17) at ServerSevices.availableServices.useridService(availableServices.java:11) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native

How to set context path in Tomcat so one could enter the site without appending the deployed folder name?

孤人 提交于 2019-11-30 18:23:03
I read about this on Tomcat guide here and some SO questions. And I think I'm pretty much doing the same thing. But in some way cannot manage to succeed. First of all I have to say that my application is deployed on a shared Tomcat server that I have no control over. I just drop my .war file and it gets deployed. I tried to package my application as ROOT.war but didn't work. The admin told me to package it as whatever the name I want and they would take care of it. I packaged it as my-application.war and it got deployed but I have to enter http://my-host/my-application to get to the website.

Change the root context to other folder in tomcat 6

╄→尐↘猪︶ㄣ 提交于 2019-11-30 10:36:42
I want to change the context of my deployed web application. Currently it is accessed by the url www.app.mysite.com/dashboard But i want to change it to www.app.mysite.com/application/dashboard I went through post to change the root context here and here . But the thing is that i have other applications running to on that server which are accessed by www.app.mysite.com/ps www.app.mysite.com/ls If i change the context path in server.xml will it affect context of my other application ?I dont want the context to change for above mentioned apps, but i want to change it for my particular

Proxy Error 502 : The proxy server received an invalid response from an upstream server

大兔子大兔子 提交于 2019-11-30 10:21:56
问题 We are building a mass mailing sending application in Java. Mail is being send by third party SMTP. After sending 400-500 mails tomcat6 service get stopped. Below is the error. Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /lin/Campaignn.jsp. Reason: Error reading from remote server Additionally, a 502 Bad Gateway error was encountered while trying to use an ErrorDocument to handle the request. Apache

How to configure tomcat to rollover catalina.log files

自作多情 提交于 2019-11-30 10:02:41
I'm trying to configure my tomcat to rollover log files once a size limit is reached. I'm running tomcat as a windows service and am redirecting all my stdout to catalina.log. This is how I configured by logging.properties to set a size limit. But it is not working. logging.properties handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler ##########################

Logging with log4j on tomcat jruby-rack for a Rails 3 application

一世执手 提交于 2019-11-30 09:30:11
I just spent the better part of 3 hours trying to get my Rails application logging with Log4j. I've finally got it working, but I'm not sure if what I did is correct. I tried various methods to no avail until my very last attempt. So I'm really looking for some validation here, perhaps some pointers and tips as well -- anything would be appreciated to be honest. I've summarized all my feeble methods into three attempts below. I'm hoping for some enlightenment on where I went wrong with each attempt -- even if it means I get ripped up. Thanks for the help in advance! System Specs Rails 3.0