jetty

Error scanning entry META-INF/versions/9/org/apache/logging/log4j/util/StackLocator.class with jetty and log4j 2.9.1?

孤街浪徒 提交于 2019-12-09 15:06:36
问题 This is the directory layout I have in my maven project: . ├── pom.xml └── src └── main ├── java │ └── biz │ └── tugay │ └── web │ └── servlet │ └── MainServlet.java ├── resources │ └── log4j.properties └── webapp └── WEB-INF └── web.xml pom.xml relavent parts as follows: </dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId>

Cleaning up Jetty - Removing 'unnecessaries' things

北慕城南 提交于 2019-12-09 14:58:06
问题 I'm used to use Jetty as my web container. What I did on my install steps is get the original tar ball and cleanup some directories and files from it. What I want to raise here, is: What are you used to remove from Jetty to use on production/staging enviroments? What I CHANGE on default jetty package: REMOVE : README.txt pom.xml javadoc/ examples/ /webapps/test* /contexts/test* /project-website /resources/log4j.properties CREATE : work/ Questions: I'm not breaking any license right? Can I

Is there any maven sleep functionality?

人走茶凉 提交于 2019-12-09 14:52:10
问题 I have maven profile set for testing where in pre-integration-tests maven starts two jetty servers and afterwards tests are started. The problem I've stumbled into is in the servers, they aren't fully loaded when tests start. It seems like the problem is fixed by adding 5 second sleep time into the tests, but I wish to add it in maven and remove from tests. Is there anyway I could do that? Please look into code sample below for additional information <build> <plugins> <plugin> <groupId>org

Jetty 7 + MySQL Config [java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext]

。_饼干妹妹 提交于 2019-12-09 14:23:29
问题 I've been trying to get a c3p0 db connection pool configured for Jetty, but I keep getting a ClassNotFoundException: 2010-03-14 19:32:12.028:WARN::Failed startup of context WebAppContext@fccada@fccada/phpMyAdmin,file:/usr/local/jetty/webapps/phpMyAdmin/,file:/usr/local/jetty/webapps/phpMyAdmin/ java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppContext at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java

If there's more than one certificate in Jetty's key store, how does it choose?

大兔子大兔子 提交于 2019-12-09 14:14:46
问题 There is some code in our system for automatically generating self-signed certificates into a key store which is then used by Jetty. If a key for a given host already exists then nothing happens but if it doesn't exist, we generate a new key, like this: public void generateKey(String commonName) { X500Name x500Name = new X500Name("CN=" + commonName); CertAndKeyGen keyPair = new CertAndKeyGen("DSA", "SHA1withDSA"); keyPair.generate(1024); PrivateKey privateKey = keyPair.getPrivateKey();

How to tie the Lifecycle for a Spring Bean to the webapps' lifecycle?

本小妞迷上赌 提交于 2019-12-09 13:24:51
问题 I want to create a bean that has start() and stop() methods. When the webapp's context is active, start() is called during Spring's runtime bootup. When the webapp is undeployed or stopped, the stop() method is invoked. Is this correct: I annotate my start() method with @PostConstruct and the stop() method with @PreDestroy ? Normally in the servlet world, I write a ServletContextListener. Would I be able to access the ApplicationContext from the ServletContextListener ? 回答1: You can either

How to specify jetty-env.xml file for Maven Cargo plugin for Jetty?

萝らか妹 提交于 2019-12-09 12:41:44
问题 I am migrating from Maven's jetty plugin to the Cargo plugin (cargo-maven2-plugin) because Cargo will happily run WARs from dependent Maven modules. Within out web-app we have taken great pains to externalize all configuration through JNDI. These JNDI definitions are web-app specific and therefore are placed in a jetty-env.xml file that is outside the WAR. Using the Jetty plugin, we specified this file as follows: <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin<

Jetty or Tomcat for small Linode

匆匆过客 提交于 2019-12-09 12:36:29
问题 my site is running on linode. I have got 380+ MB RAM. I need to run the web server + Solr + Postgres + memcached on the same space. Which is best Jetty or Tomcat? It is simple, plain search server. We use Pylons for development. 回答1: Jetty can be set up to load only the features you need. For example you can turn off session support. I think Jetty is better in general case either, see Jetty vs Tomcat comparison. 回答2: I have used both, and found that Jetty was a heck of a lot easier to set up

Separate webapps in Jetty on different ports

≯℡__Kan透↙ 提交于 2019-12-09 12:00:23
问题 I need the following setup. Jetty must listen on port 8080 and 9090 Each port must have its own separate applications (i.e. webapp1 runs on 8080 and webapp2 on 9090 ). The web-apps should only be accessible on their designated ports (i.e. webapp2 must not! be available on port 8080 ). I have successfully added extra connectors to etc/jetty.xml so it now uses port 8080 and 9090. I have also added extra handlers so it now pick ups webaps from multiple directories (dir1/webapp1 and dir2/webapp2)

解决jetty7.x log日志异常巨大问题

∥☆過路亽.° 提交于 2019-12-09 11:25:04
最近从jetty6升级到了jetty7发现硬盘空间动不动就满了,我找... 我找.... 我找原因.... 发现是jetty7 logs目录搞得鬼,仅仅是个开发环境,1天1GB的日志,疯了! 这要是弄到生产环境还不完蛋啦!!我相信jetty的开发者不会这么缺心眼的、少智慧的,于是乎googling..... E文太差先找中文的,发现了两位网友写的文章,说jetty自己实现了log系统,需要复写这个类..... 当时晕倒,不用这么麻烦吧。。。 于是觉然的开始 googling E文,终于找到了解决办法 jetty7有两套log系统,默认使用自己的 org.eclipse.jetty.util.log 如果配置来log4j则使用log4j。 在 ${jetty.home}/lib/ext 放入log4j jar包 在.jettyrc中加入 (jettyrc是什么我就不解释了) -Dlog4j.configuration=file:/home/jetty/app/jetty7/resources/log4j.properties # This is not needed by Jetty - but it helps with many web apps. log4j.rootLogger=WARN, stdout log4j.appender.stdout=org.apache