jetty

Stopping jetty when changing Maven module?

Hi. I've created a project that runs integration-tests on 3 web services. There's a project for each integration-test per web-service. I want all 3 integration-test projects to be run when executing the parent pom (outside of the 3 integration projects). I've got the modules up and running but since each module deploys a WAR to its jet...

Struts 2 + Maven + Struts 2 Rest Plugin help

Hi I am new to Struts 2 and all the java web development, I created a basic struts2 application using maven and then added the struts2-rest-plugin to build my project; here is pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>tutorial</groupId> <artifactId>tutorial</artifactId> <pa...

Logging a Jetty SSL Client Certificate Issue

I am trying to configure Jetty (via the jetty-maven-plugin) to use client certificates. I have it working (somewhat) without the client certificate, but with the set to yes, absolutely nothing happens. What I need to know is how to configure Jetty to log its startup and operation to try to figure out the issue. Can anyone assist? ...

jetty and eclipse

hi, I'm trying to run a jetty server from a main. It always starts from http://0.0.0.0:8888; I have changed jetty.xml and added set host to 127.0.0.0 when i run a command on the downloaded jetty files, it starts correctly at 127.0.0.0. But eclipse keeps on starting at 0.0.0.0. It is running jetty 6.1, not the 8.0 version I have downloade...

HttpServletRequest: How to determine Content-Type of requested asset

Hi All, I am writing a quick-and-dirty static file server using Jetty. I need to set the Content-Type for each response: HttpServletResponse.setContentType("content/type"); For a given file request, how do I reliably determine what content type to set? Is it a question of examining the file extension, or is there a more sophisticated...

run command after jetty starts in batch

Ok, here's the problem. My goal is to run FF Portable, when Jetty starts. My start.bat looks like that: @echo off start /B start_jetty.bat start /B start_firefox.bat start_jetty.bat: @echo off cd jetty-7.1.6/ java -jar start.jar start_firefox.bat: @echo off ping -n 1 -w 6000 0.0.0.1 "%cd%\FirefoxPortable\FirefoxPortable.ex...

how to specify the contextPath

Hi I am using jetty servlets. I have the following structure. war/web-inf/web.xml war/classes/servlet.class (servlet I want to call) war/*.html Problem: ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setContextPath("/"); context.addServlet(new ServletHolder(new GreetingServic...

GWT and Jetty - HTTP method GET is not supported by this URL

Hi, I'm starting a servlet extending google's RemoteServiceServlet in Jetty. It did not work with this error: HTTP method GET is not supported by this URL I searched this error and found that RemoteServiceServlet does not implement doGet and doPost. I tried this link http://docs.codehaus.org/display/JETTY/GWT. It didn't work either. An...

Spring WS Osgi samples

We are currently researching OSGI at work and I need to provide a proof of concept on its use with spring dm and spring-ws in the appropriate application server(tomcat / jetty).Does anyone have a example or a tutorial or any links that can help in my research? I have for the past dew days been looking for some samples on how to implemen...

How can I include test classes in exploded war for integration testing using Maven, Jetty & Spring?

I am trying to get integration tests going with Spring, Maven and Jetty. I have got a Jetty server to start up running my app before the integration tests start using the Maven Jetty plugin and a run-exploded pre-integration-test goal. This works well for testing using net.sourceforge.jwebunit.junit.WebTestCase. What I need to do now i...

share session between two applications in jetty

How to share session between two applications in jetty? ...

Is there a way to run multiple Grails apps on the same web server without running into PermGen errors?

We're developing a few Grails applications, and deploying the WARs on Jetty. When we run each of the applications one at a time, they hover at around 200 - 300 MB of memory, which is perfectly acceptable. But, adding any more applications increases the memory footprint... by a lot. Once we have our three applications running, we usual...

Problems with jetty crashing intermittently

Hi, I'm having problems with jetty crashing intermittently, I'm using Jetty 6.1.24. I'm running a neo4j Spring MVC webapp, Jetty will stay running for approx 1 hour and then I have to restart Jetty. It is running on small amazon ec2 instance, debian with 1.7gb of RAM. I start Jetty using java -Xmx900m -server -jar start.jar I am conn...

Grails IncompatibleClassChangeError

I deploy a war made with "grails war" to a jetty server. As far as I can determine, Grails builds with Sun JDK 1.6.0_17-b04 and jetty runs on Sun JDK 1.6.0.16 (both on linux). 2010-08-18 07:33:47.018:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is org.codehaus...

How would I run an .sh file using NSTask and get its output?

I need to run an .sh file and get its output. I need to see the setup of the file as well. The .sh file simply runs a java app through terminal. Any ideas? I'm truly stuck on this..... Elijah The server.sh file: echo Starting Jarvis Program D. ALICE_HOME=. SERVLET_LIB=lib/servlet.jar ALICE_LIB=lib/aliceserver.jar JS_LIB=lib/js.jar ...

How can i use embedded Jetty with JSFUnit?

I would like to test my JSF application using JSFUnit and embedded Jetty. How can i do this? Is there any documentation which demonstrates this? I started a jetty server programatically using junit4's @BeforeClass but it seems JSFUnit tries to connect to the server before the static method annotated with @BeforeClass can execute! ...

Redirect non www version of domain to www in Jetty

I cannot redirect my non www domain version to www with MovedContextHandler, it does not have host to redirect to. Both www.myhost.com and myhost.com point to my web server IP. When someone tries to open myhost.com he is still able to access my site that way. I want for his browser to receive 301 to www.myhost.com instead. It is importa...

What does $1 mean in JAVA?

Here is a shell script: echo Starting Jarvis Program D. ALICE_HOME=. SERVLET_LIB=lib/servlet.jar ALICE_LIB=lib/aliceserver.jar JS_LIB=lib/js.jar # Set SQL_LIB to the location of your database driver. SQL_LIB=lib/mysql_comp.jar # These are for Jetty; you will want to change these if you are using a different http server. HTTP_SERVER_L...

Jetty ant task hangs in build

I have a problem when I run Jetty task with my war file. Here is my output: [jetty] Configuring Jetty for project: Guardian [jetty] 2010-08-23 18:53:09.062:INFO::Logging to STDERR via org.mortbay.log.StdErrLog [jetty] [jetty] Configuring Jetty for web application: project [jetty] Webapp source directory = C:\Projects\GUARDIAN\build\d...

jetty via apache mod_proxy

Using an Apache virtualhost and mod_proxy I want to access a java application (myapp) available in a jetty instance on port 8080. With ProxyPass / localhost:8080/ on my apache virtualhost configuration I can access the application running in jetty with www.mydomain.com/myapp but I want the application to be accessed from www.mydomain.co...