jetty

spring or jetty.xml?

I have a spring web application (currently packaged as a war file) which I would like to be able to launch from jetty in a stand-alone configuration (small scale all-in-one deployment, and for launching in the development environment). Since I am already using spring, it seems like what I want to do is create my jetty Server and WebCont...

Connection reset SQLException with jetty

Hi, I've switched my webserver from tomcat to jetty and encounter a "java.sql.SQLException: Io exception: Connection reset" when back from idle time (eg. i go out for a while) :( This issue doesn't appear when i use tomcat. Does it come from jetty or i've done something wrong ? Here is my datasource config <bean id="dataSourceOracle"...

Serving static content with jetty 7, using defaultservlet configured from web.xml

Hi All, This is jetty 7 and xml configured, not embedded. I'm trying to serve a static file, crossdomain.xml, to an app that connects to a datasource I run from jetty. To do this, I configured a servlet and its mapping thus: <servlet> <servlet-name>default </servlet-name> <servlet-class>org.eclipse.jetty.servlet.DefaultServ...

Setup Jetty 7 with JSP engine

I've been trying to get Jetty to run my web app via a custom launcher (embedded). I am trying to figure out how to tell Jetty which java compiler to use for JSPs. I want to do what java -jar start.jar -OPTIONS=jsp does, but without using start.jar. Here is what shows on the console: Javac exception, Unable to find a javac compiler; c...

Where do I put my jetty.xml file with Jetty embedded?

I am just getting started with Jetty (Jetty 6 w/ Java 6). Using the example files with Jetty 6, I place my xml configuration file. in the same directory as my java file. But when I run the project I get this error. Exception in thread "main" java.lang.NullPointerException at net.test.FileServerXml.main(FileServerXml.java:13 Here is t...

how to configure jetty 7 to use syslog or log4j

I am looking for a way to direct all the jetty 7 logging to syslog. My current configuration dumps everything to JETTY_HOME/logs/.. After some initial ivestigation, it seems I should change JETTY_HOME/etc/jetty-logging.xml, but this does not look straightforward. It looks like I should create a new PrintStream implementation which sends...

Jetty 6: Unknown Error 99

The system I'm developing is comprised of a jetty server (v6.1.2rc4) and a php frontend that sends http requests to jetty via curl_exec. The server and the client are on the same machine. The requests I send can be both POSTs and GETs, I get the same error for either which is: Failed to connect to 127.0.0.1: Unknown error 99 This is ...

Spring MVC and Jetty: Prevent jsessionid from being used in RedirectView on redirect to external site

In Spring MVC 2.5 with Jetty - probably with any servlet container -, I want to redirect to an external site using RedirectView via the magic "redirect:" prefix for the view name in ModelAndView. Unfortunately, RedirectView uses response.encodeRedirectURL(), so my (otherwiese wanted) session id is appended to the URL. It is not only a ...

migrating an embedded jetty server from v6 to v7

Hi chaps, I have an embedded servlet which I use in unit tests, looks like this: public class UnitTestWebservices extends AbstractHandler { private Server server; private Map<Route,String> data = new HashMap<Route,String>(); public UnitTestWebservices(int port) throws Exception { server = new Server(port); ...

Unpacking an assembly inside of a war

Hi all, I have another project which contains static content (css, images, JS, etc.), and I need that to be copied to the web root directory of jetty for testing. In that project, I output a zip file packaging up all of the images, CSS, etc. I have several of those virtualhost projects for different clients and my question is, how do ...

Problem with cometd and jetty 6 / 7

Hi chaps, I'm trying to get started with cometd (http://cometd.org/) and jetty 6 or 7, but I seem to be having problems. I've got an ant script that packages my code up into a war with the cometd 1.1.1 binaries and jetty binaries that are appropriate to the version of jetty I deploy the war to (so 7.1.2.v20100523 binaries when I deploy t...

Cross site scripting help?

I have a piece of javascript executing on a jetty server which is sending a XMLHTTPRequest to a scoket on another server(wamp server). The request gets sent to the socket, however the XHR response seems to be getting blocked. My only thoughts on this is it may be an issue with XSS(cross site scripting). Is there a way in which i could en...

Jetty server handling 1 request at a time

Hi, I'm very new to Jetty and have a simple server following their HelloWorld example using a SessionHandler. My class is called OrbVend and it extends SessionHandler. I have overridden doHandle and my main is as follows: public static void main(String[] args) throws Exception { Server server = new Server(8999); SessionIdM...

How to deploy a Scala project from Eclipse?

I have a Scala project in Eclipse that I need to package up so I can deploy it to a server. It's based on Jetty but it runs as a standalone application. It contains Scala classes, Java classes and a number of 3rd party jars. I assumed there would be some kind of deployment option in the Scala Eclipse plugin but I've drawn a blank. What...

Can I use a Tomcat Valve with Jetty?

Is it possible to use a Valve for Tomcat also together with Jetty? If yes how can I set it up with jetty.xml and/or embedded? ...

Can Jetty be installed on ubuntu server?

I plan on using solr on my VPS. My server is Ubuntu. Does anybody know if Jetty can run without problems on Ubuntu, just as in the example Solr distribution? With Tomcat it is possible, but my Q is, is it possible with Jetty? Thanks ...

Jetty RewriteRegexRule gives 404

I'm using jetty.xml very similar to the one found here: http://communitymapbuilder.osgeo.org/display/JETTY/Walkthrough+jetty.xml I have a WAR file deployed to webapps directory: webapps/myapp.war. I also have a jetty-rewrite.xml file, with contents as shown here: http://gist.github.com/417634. I use start.jar to run Jetty like java -j...

Webapps for i-Jetty

Hello, Has anyone created an app for i-Jetty? I'm trying to get started using it but I don't understand what I need to do to create the .war file. When using the dx tool to change my .class files to .dex I get an UNEXPECTED TOP-LEVEL EXCEPTION: ...

are expanded war files faster?

I'm using embedded jetty to launch a web application which I have currently packaged as a war file. At first I was trying to prevent my war file from being expanded; then I began to wonder: Q: is there some advantage for jetty to expand the war file contents? And even if its slower... Q: how can I prevent jetty from expanding it (or ...

Java Web Server with Jetty - TCP Connections Taking Long

I have an application with fairly high traffic (20K req/min) running on the JVM with a Jetty servlet container on Ubuntu. Below is my Jetty configuration: 10 20 2000 2 When I analyze the network traffic, I realize that sometimes it is taking long to establish TCP connections on the port that Jetty is runn...