jetty

Strangeness when deploying JRuby app under Jetty

This problem is maddening and I hope someone can point me in the right direction. I'm trying to deploy an instance of Redmine to a Jetty servlet. I've created the war using Warbler, have created the context, and it seems to deploy. Unfortunately, I see the following behaviors: If I access my app at its configured hostname's /, I see a ...

User thread spawning in Jetty

I have a web application running over Jetty, and I need to spawn a thread for idle connection handling. This thread is being started in the spring context. I know it's not a good practice to spawn threads in a container, but couldn't find a better way to do this. Any ideas? ...

How to install log4jdbc on solr

What is the procedure for installing log4jdbc into Solr? http://code.google.com/p/log4jdbc/ ...

How to configure Jetty 8 for a Dynamic Web Project in Eclipse?

The only Jetty there's available seems to be 6, which is ancient. ...

Embedding jetty server for EXT GWT in Eclipse

I am trying to create an EXT GWT project with an embedded Jetty server. I am completely new to Jetty and EXT GWT. Can anyone please point me in the right direction to get started about embedding jetty server for EXT GWT project? I have read a couple of blogs and tutorials but cannot figure it out. I have also downloaded Eclipse plugin fo...

Jetty Run War Using only command line

Is it possible to use only the command line to Run jetty with only a specified war file and context path. Something like: java -jar $jettyHome/start.jar -Dwar.location=myApp.war -DcontextPath=/myApp OPTIONS=default,plus,jsp ...

Force Jetty to make 301 redirect

I have Jetty application which is very big. I need to replace all 302 redirects to 301. Can I force Jetty to always do 301 redirect when doing response.sendRedirect('someURL') ? ...

How does one set a custom WebAppClassLoader in Jetty through config?

Hi, all. I am trying to configure a Jetty (6.x) WebAppContext with a custom subclass of WebAppClassLoader. In code (Scala), it's simply this: val context = new WebAppContext() val cwacl = new CustomWebAppClassLoader(context) context.setClassLoader(cwacl) ... This works fine when embedding Jetty. In production, however, I ju...

Add resources to Jetty programmatically

I have a main class that configures and fires up Jetty. (That's standard practice from Wicket for testing a webapp, but it's really not wicket-specific.) final Server server = new Server(); //skipped socketconnector initialization final WebAppContext bb = new WebAppContext(); bb.setServer(server); bb.setContextPath("/"); bb.setWar("src...

Jetty ant task configuration

Two questions on configuring the jetty ant task to get jetty to listen on a different port, I'm doing this in the jetty.xml: <Call name="addConnector"> <Arg> <New class="org.mortbay.jetty.nio.SelectChannelConnector"> <Set name="port"><SystemProperty name="jetty.port" default="9080"/></Set> </New> </Arg> ...

mysterious console output to stderr from jetty?

When running my embedded jetty web app launcher, I see the following output to stderr. I just started seeing this after moving my build to maven-2. Has anyone seen this before? IDLE SCEP@988057 [d=false,io=1,w=true,rb=false,wb=false],NOT_HANDSHAKING, in/out=0/0 Status = OK HandshakeStatus = NOT_HANDSHAKING bytesConsumed = 5469 bytesPr...

Jetty - What is the difference between WebSocket.sendMessage(String data) and void sendMessage(byte frame,String data) ?

I am playing around with websockets and Jetty 7.1.6.v20100715. I have a few questions, mostly because of the lack of info/explanation about these methods. 1st) What is the byte for in sendMessage(byte frame,String data). 2nd) Is there any reason for outbound.sendMessage(string) not to work if invoked from the WebSocket.onConnect() me...

spring embeded jetty+cxf

I'm running embedded jetty inside of a spring ioc container. The spring ioc contains also an embedded hsqldb which makes the whole configuration a nice and complete web application development environment (on a single JVM). Now I'm trying to add apache CXF to this environment to make the jetty host not only servlets but also web services...

What is the best practice to deploy database config (username/password) with Java web-app (web.xml)?

I have a Java web-app using standard web.xml and servlets. At the moment, I'm using the <context-param> tags in web.xml to define the database configuration (JDBC url, username, password, etc.). These are picked up by a servlet in its init() method. But I'd like to not include database username/password in my source repository. For t...

Howto get rid of directory prefix in Java webserver url?

I am using Maven with Jetty / Tomcat. My pom.xml declares the ID of my application as <artifactId>webapp</artifactId>. Consequently, all my webapp source is located in src/main/java/webapp. Now, whenever I run any of the webserver, my URL looks like this: http://localhost:8080/webapp/index.html and I haven't found a clue that tells me...

How to display images using HTML created by servlets on Jetty web server?

Hi, I am trying to display images using an HTML page created by a servlet. I am using Jetty 6.18 as the web server. The problem is I'm not sure where to store the image files and how to register them (if needed), since the HTML returned to the client is generated by a servlet. Let's say I want to write a tag <img src="what_to_write_h...

Bayeux code example for Resin 4

Anyone have working (simple) example source code of the Bayeux + Comet support in Resin 4? Thanks. (or if not, any for Jetty?) ...

Web service using CXF, Jetty and Spring

I try to create simple web service with CXF, Jetty and Spring. I create service interface @WebService public interface AnonymousService { @WebMethod public String getVersion(); } and its implementation @Service("anonymousService") @WebService( serviceName = "AnonymousService", targetNamespace = "http://ws.test/", ...

HowTo use https / ssl with Maven/Mortbay Jetty Plugin?

I would like to use ssl / https as described in http://docs.codehaus.org/display/JETTY/How+to+configure+SSL using jetty-maven-plugin, but I don't know how to configure the plugin. Any hint, example, tutorial, walkthrough ? Also, I wonder how to carry out Step 3b of the above mentioned tutorial, where manipulation the jetty server is n...

Problem with C3P0 connection pooling in ServletListenerContext when deploying to Tomcat 6

Hello there, first things first: I've read various related questions on here, before actually deciding to enter my question anyway. The reason is that my problem is somewhat different from the others I've read about. My aim: I have an application written in GWT (I'll explain later why it's relevant) that access some servlet via RPC. Th...