jetty

jetty-maven-plugin and loadTimeWeaver

折月煮酒 提交于 2019-12-09 09:03:59
问题 can't seem to have my spring webapp working with jetty-maven pluging i always get org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [org.eclipse.jetty.webapp.WebAppClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:org

Weird NoClassDef-s with Eclipse Jetty's Maven plugin

不羁的心 提交于 2019-12-09 07:12:36
问题 I am using an embedded Jetty via the Eclipse Jetty Maven plugin (9.1.0.M0). I have the following plugin configuration in my pom.xml : <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <version>${version.jetty}</version> <configuration> <scanIntervalSeconds>10</scanIntervalSeconds> <daemon>true</daemon> <webApp> <contextPath>/</contextPath> <descriptor>${basedir}/src/test/webapp/WEB-INF/web.xml</descriptor> </webApp> <httpConnector> <port>48080</port> <

Embed Apache ZooKeeper in Jetty generates Debug log message

陌路散爱 提交于 2019-12-09 06:55:24
I am using Jetty 8 and ZooKeeper 3.4.5. When I connect to ZooKeeper, jetty keep generating DEBUG level message. How to suppress it? 16:54:56.757 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration 16:54:56.758 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client.ZooKeeperSaslClient - Could not retrieve login configuration: java.lang.SecurityException: Unable to locate a login configuration 16:54:56.758 [main-SendThread(127.0.0.1:2181)] DEBUG o.a.z.client

How do I change the spark.ui.port?

让人想犯罪 __ 提交于 2019-12-09 06:49:34
问题 I am using spark-submit and tried to do this in the jar file with .setExecutorEnv("spark.ui.port", "4050") on the spark context, but it still tried to hit 4040. I then tried to put a --conf spark.ui.port=4050 after spark-submit and before --class CLASSNAME , but that didn't work either, this time saying "Error: Unrecognized option '--conf'". How do I get around this? The actual error I'm running into is that there is an active spark server that others are using that is preventing this spark

How can I deploy a WAR in an embedded Jetty 8?

半城伤御伤魂 提交于 2019-12-09 05:40:51
问题 With the following code, how can I deploy a WAR application located on the classpath ? private Server s; @BeforeClass public static void setUp() throws Exception { // Start http server Random r = new Random(); int port = 1024 + r.nextInt(8976); s = new Server(new InetSocketAddress("127.0.0.1", port)); // Add my WAR for deployment here ... s.start(); } Jetty 8.0.1 JDK 6 回答1: Something like WebAppContext webapp = new WebAppContext(); webapp.setContextPath("/"); webapp.setWar(warURL); server

Jetty 7: configuring JNDI for Start.java

给你一囗甜甜゛ 提交于 2019-12-09 05:39:45
问题 Following Wicket 1.5's lead, I'm converting a project from Jetty 6.1.25 to 7.5.0.v20110901. My existing Start.java contains the following setup, which I use to configure JNDI: EnvConfiguration envConfiguration = new EnvConfiguration(); URL url = new File("src/main/webapp/WEB-INF/jetty-env.xml").toURI().toURL(); envConfiguration.setJettyEnvXml(url); bb.setConfigurations(new Configuration[]{new WebInfConfiguration(), envConfiguration, new org.mortbay.jetty.plus.webapp.Configuration(), new

Embedded Jetty why to use join

半世苍凉 提交于 2019-12-09 05:03:57
问题 An example taken from an Embedded Jetty tutorial suggests the following: public static void main(String[] args) throws Exception { Server server = new Server(8080); server.setHandler(new HelloHandler()); server.start(); server.join();} Why do I need to add the line server.join() ? It works fine without it. 回答1: join() is blocking until server is ready. It behaves like Thread.join() and indeed calls join() of Jetty's thread pool. Everything works without this because jetty starts very quickly.

Why when I run a project created with Maven on Jetty it is not found (404)?

倾然丶 夕夏残阳落幕 提交于 2019-12-09 02:13:28
I am started to read the Vaadin 7 CookBook and I got stuck at this point: We are done and we can run our new web application. Go to the root of the project where pom.xml file is located and run the following command. mvn jetty:start I experienced some problems right away when I ran that command: Maven: No plugin found for prefix 'jetty' in the current project... This helped me: http://blog.loxal.net/2014/03/maven-no-plugin-found-for-prefix-jetty.html add something like the following to your ~/.m2/settings.xml org.mortbay.jetty ...to resolve this issue. Now jetty starts: $ mvn jetty:start [INFO

Configuring Jersey + Jetty + JSP

纵饮孤独 提交于 2019-12-08 23:05:48
How do I configure this project so that it will be able to render JSP files? I would want to have URLS starting with /rest to route to jersey resources and have /* URLS serve JSP files. I don't have any web.xml in this project. Project folder ├───src │ └───main │ └───java/Main.java │ └───resources/HelloResource.java └───WEB-INF └───jsp/NewFile.jsp HelloResource.java package resources; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; @Path("/hello") public class HelloResource { @GET @Produces("text/plain") public String handleGreeting() { return "Hello World"; }

Enforce HTTPS with Embedded Jetty on Heroku

荒凉一梦 提交于 2019-12-08 19:20:31
We have a Java servlet, running with embedded Jetty, deployed to Heroku using the "SSL Endpoint" add-on. I have the requirement that all pages in the app be served over HTTPS, regardless of whether the user navigates to our app with http or https. The application recognizes requests made over https, but it also accepts http requests without redirecting (which it should not do). Also, if the user starts with an https connection, then whenever a form is posted and redirected to a "GET" request, any https connection is reverted to http. I tried adding a URL filter that simply changed "http://" to