Limit on the length of the data that a webserver can return in response to a GET request

Original Answer: There are no limits on the amount of data returned on a HTTP response from Jetty. You could stream data back to the client until shortly before the heat death of the universe. Technically speaking, you can have a HTTP Response with no Content-Length specified, which can be returned using either the Chunked … Read more

Use Jetty or Netty?

Jetty has had support for asynchronous request processing since version 6 (see here), using a proprietary API. More recent versions support the asynchronous API as part of the Servlet 3.0 API, like any other compliant implementation. Using Netty would seem like a lot of work for little gain, unless you have highly specific requirements. Otherwise, … Read more

How do I create an embedded WebSocket server Jetty 9?

Update: Dec 2, 2013 For an up to date example of the Embedded Jetty with WebSocket see: https://github.com/jetty-project/embedded-jetty-websocket-examples Original Answer There’s an example found in the test cases. http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/examples/echo/ExampleEchoServer.java Short Answer: Server server = new Server(8080); WebSocketHandler wsHandler = new WebSocketHandler() { @Override public void configure(WebSocketServletFactory factory) { factory.register(MyEchoSocket.class); } }; server.addHandler(wsHandler); server.start(); server.join(); This … Read more

HTTP ERROR: 404 missing core name in path with solr

I’ve gotten the same error: HTTP ERROR: 404 missing core name in path In my case I’ve forgotten so set the solr/home value in the WEB-INF/web.xml file <env-entry> <env-entry-name>solr/home</env-entry-name> <env-entry-value>/put/your/solr/home/here</env-entry-value> <env-entry-type>java.lang.String</env-entry-type> </env-entry> After I’ve added the above code and restarted the server, the error was gone.

Eclipse RCP plugin + embedded Jetty + JSF

Take a look at setting a context in jetty. You can define it before start your server. public class OneWebApp { public static void main(String[] args) throws Exception { String jetty_home = System.getProperty(“jetty.home”,”..”); Server server = new Server(8080); WebAppContext webapp = new WebAppContext(); webapp.setContextPath(“https://stackoverflow.com/”); webapp.setWar(jetty_home+”/webapps/test.war”); server.setHandler(webapp); server.start(); server.join(); } }

Jetty Run War Using only command line

Use the jetty runner. java -jar jetty-runner.jar my.war With Maven, you can install by adding to your pom.xml: <build> … <plugins> … <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.3</version> <executions> <execution> <phase>package</phase> <goals><goal>copy</goal></goals> <configuration> <artifactItems> <artifactItem> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-runner</artifactId> <version>7.5.4.v20111024</version> <destFileName>jetty-runner.jar</destFileName> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build> Run: mvn package And use as: java -jar target/dependency/jetty-runner.jar target/*.war … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)