jetty

Unit testing JSPs in embedded mode

I am in process of building up a small framework that does unit testing for JSPs. These JSPs have some custom tags, otherwise they are not any special. Although there are numerous Java unit testing solutions available, I prefer not to use the method where a separate full-blown JSP container is launched, application deployed and results ...

Which is better JETTY COMET implementation or Resin COMET implementation

We've been using JETTY's suspended servlet implementation to roll our own COMET web applications using JSON messages and XStream. Does anyone have experience with Resin's implementation of COMET and how they compare? Also more generically than COMET does anyone have suggestions on the best Java Suspended servlet 3.0 implementation. H...

Clustering COMET using Terracotta

We're trying to cluster a COMET web application written in Java using JETTY 7.0's implementation of suspended servlet 3.0 API. Does anyone have experience using Terracotta in a suspend/resume servlet web application. Greg Wilkins of JETTY mentions some issues with COMET performance with Terracotta. Clustering COMETD with Terracotta ...

Use spnego credentials to access different page

I have an application that is served using jetty 6.1.12 from serverA. serverA is kerberized using the spnego filter and runs fine when I run it from the browser. I am now trying to access a different site (serverB) from one of the classes in the serverA. This new site uses the same authentication scheme i.e., if user can see pages on ser...

GWT/Eclipse/Jetty issue: Jasper can't resolve tag libraries

I'm trying to get GWT Hosted mode working in Eclipse, à la this HOWTO. Servlets work fine, as does my GWT code, but all my JSPs fail because with errors such as the following: [WARN] /view/lniExecutiveSummary.htm org.apache.jasper.JasperException: /WEB-INF/jsp/lni/lniExecutiveSummary.jsp(1,1) The absolute uri: http://java.sun.com/jsp/...

How do I set up Jetty 6 & Jboss 4.0.5 virtual hosting?

I have 2 webapps deployed in the same JBoss/Jetty server. In Jetty 5.1.14 I had the following jetty-web.xml which configured one of the apps to run as a virtual host (on the same port): <Configure class="org.jboss.jetty.JBossWebApplicationContext"> <Call name="addVirtualHost"><Arg>app2.localhost.com</Arg></Call> </Configure> This ...

How to initialize Jersey with a a specific resource instance with specific MessgeBodyReaders/Writers??

I'm trying to start Jersey on a preconfigured port/url with a preconfigured resource instance. I can't quite figure out how to correctly do it. Here is a snippet of a code. Help me, please, fill in the blanks: @Component @PerRequest @Path("/svc") @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Produces({MediaType.AP...

exception when invoking ehcache-server within embedded Jetty via Cargo: WebApplicationProviderImpl could not be instantiated

I'm working on a web application that uses a standalone ehcache server to cache certain data. The ehcache server is accessed via REST (as opposed to SOAP). For functional testing purposes, I need to run an embedded instance of the ehcache server. The echcache-server project itself does this for its own functional tests, using the Cargo ...

How can I create a servlet with jruby (running with jetty)?

Hi, I am pretty new to jruby and java and want to create a servlet in jruby while using jetty as web server. I am not sure if I am on the right way with the following code which shows the input form so far. I guess I have to extend now the HttpServlet class to handle the posted data but I don't know how to do this in this case and if it...

Application server - to use or not use?

Typically we use WebLogic or JBoss to deploy our apps. I understand that when using open source solutions like Spring you can develop your app and run it on a simple servlet container like Jetty. So the question would be why even bother with an app server? ...

Has anyone successfully deployed Sonar on Jetty 7 ?

I am trying to deploy Sonar (automatic code monitoring tool) on a Jetty 7 servlet container. I would like to use the default config first (embedded Derby DB) as a POC and transition to a production grade DB later. So far I have tried various ways to make this work (todo: document failed attempts) without any luck... Did anyone manag...

Supporting Single sign-on changing domain of JSESSIONID session cookie domain on Jetty

I'm trying to support single sign-on with JETTY and we have 2 subdomains running webservers that will support single sign-on through Jetty's SSO support. account.test.com app.test.com We have a SSOSession cookie that is set to *.test.com, but to support sign-off I need to ensure that my Jetty server running at app.test.com has it's JSE...

Unable to re-use HSQLDB in Jetty between restarts

I'm using the maven-jetty-plugin to run a Spring application. Initially the datasource was declared inside Spring. Due to external constratins, I've moved it to JNDI. The jetty-env.xml section I use for local development is: <New id="dataSource" class="org.mortbay.jetty.plus.naming.Resource"> <Arg></Arg> <Arg>jdbc/DataSource</Arg> <A...

What limits "hot deploy"?

You can perform hot deploy when you have native Java code on Jetty. This allows you, for example, to make changes to your servlet code without requiring a restart of the server to see your application changes. However, if you run a scripting language on top of Java - Groovy, JRuby, Jython - you can no longer perform hot deploy (at le...

java: basic web service interface without a web server

hi everyone, how hard is adding a basic web services interface to an existing java server application without having to turn it into a .war, or embedding a small web server like jetty? say, xml-rpc instead of more modern approaches, if it helps. if not too hard, can you suggest a starting point? thank you in advance :) ...

How do I install Jetty WTP Server Adapter for Eclipse 3.5?

Currently I am attempting to install the Jetty WTP Server Adapter for Eclipse 3.5 and get the following errors: An error occurred while collecting items to be installed session context was:(profile=epp.package.jee,phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect, operand=, action=). No repository found containin...

Seam - No Active Event Context

Hi all, I am having problems with my Seam application, I'm not sure if it is from using Maven along with Jetty for testing or simply a misconfiguration on my part. The error I am getting is rather simple, when Seam attempts to close the event context, it expects it to be open and it must have already been closed by something else. The...

Servlets and static content with JRuby embedded jetty

Hi, I would like to serve servlets and static content with jetty embedded in JRuby. I tried this: server = Server.new(8080) context = Context.new(server, '/', 0) context_static = Context.new(server, '/static', 0) context_static.setHandler(ResourceHandler.new) context_static.setResourceBase('./') context_static.setContextPath('/static'...

Shortest code to start embedded Jetty server

I'm writing some example code where an embedded Jetty server is started. The server must load exactly one servlet, send all requests to the servlet and listen on localhost:80 My code so far: static void startJetty() { try { Server server = new Server(); Connector con = new SelectChannelConnector(); ...

Installation of Jetty into Eclipse

Hi I've had Jetty recommended as a good container for fast and simple development, in my case, Java Server Faces. I wish to use it with my Eclipse IDE (Version: 3.4.1), but quite frankly, can't figure out how. I've tried various outdated plugins, only with large amounts of errors in return, so I'm hoping someone could guide me from dow...