jetty

Usage of Static variables in Java Servlets (e.g. in AppEngine)

I have an application where Servlet has a method called Update(ReqIn, ReqOut). I call it from doGet & doPost and pass the Request and Response variables, and it is then up to Update(...) to fill out the following static variables: ... public class Server extends HttpServlet { public static HttpServletRequest In = null; public s...

override an already declared filter by using weboverride.xml in jetty

Solr declares a filter in its web.xml which handles the request (actually handles it, not just intercept it). Hence any filter that I add to my web context using jetty's weboverride.xml technique does not work, because the request never reaches my filter. I need to add a filter before Solr's filter to this web application, and I do not w...

Problem with Apache Commons Id UUID Version 1 generation

My problem is to generate version 1 UUIDs. We use Jetty 6.x, Maven (to start Jetty among other things) and Apache Commons ID (to generate UUID version 1 from the current time). Apache Commons ID requires a configuration file that is told to the JVM, using a parameter, e.g. 'org.apache.commons.id.uuid.config.resource.filename=commons-id-...

What jetty jar should I use?

I'd like to create an application using the embedded version of Jetty. Unfortunately, I can't find any information on what jar files I would need to do that. There are several in the maven repository (http://repo2.maven.org/maven2/org/eclipse/jetty/aggregate/). But what's the difference between jetty-server, jetty-server-all, and jett...

Metro + Jetty + OSGi = pain

I am trying to swap out Sun's HTTPServer for the much better Jetty server, within an OSGi bundle, running on Equinox. I have tried this: System.setProperty("com.sun.net.httpserver.HttpServerProvider","org.mortbay.jetty.j2se6.JettyHttpServerProvider"); but when endpoint.publish(url) is called, and the server is spawned, it complains o...

eclipse jetty:run differs to cli mvn jetty:run

I have managed to track a problem where within eclipse I see no error, but anywhere outside eclipse the error exists. The error I get when run outside eclipse is LazyInitializationException from hibernate - caused by a ${entity.service.id} reference in the jsp. Outside eclipse I have tried jetty standalone, mvn jetty:run from the comma...

jsp:text losing whitespace inside tagx

Trying to use JSPX and running into a strange problem. Text inside jsp:text is supposed to not be subject to whitespace removal, according to the JSP documentation, but when I have a jsp:text element with leading whitespace in the beginning of a tagx file, when used in the jspx views, the leading whitespace disappears. I've done quite ...

Does jetty 6.1.8 supports jdk 1.5?

Hello i install jetty 6.1.8 on windows for development, I configure it in eclipse to run with jdk 1.5, and my project is configured to build using the same jdk. my problem is my project can't be runned using jetty server. it complained the below error message. Please note I can start jetty without error when there is no project added. ...

Servlet web.xml authentication for welcome page

I have a web.xml which looks like: <web-app> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <security-constraint> <web-resource-collection> <web-resource-name>Default</web-resource-name> <url-pattern>/</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint> ...

How to configure cache for static resources in web.xml for Jetty?

I was reading this: http://docs.codehaus.org/display/JETTY/LastModifiedCacheControl It says "The Jetty default servlet allows the cache control header to be set for static content by using the cacheControl init parameter using <init-param> <param-name>cacheControl</param-name> <param-value>max-age=3600,public</param-value> </init-par...

Debuging issue with maven, jetty and IDEA

I have problem with running jetty in debug and attaching IntelliJ IDEA to listening port. mvnDebug jetty:run-exploded will start jetty as I can see following message Preparing to Execute Maven in Debug Mode Listening for transport dt_socket at address: 8000 However when I try to to connect IDEA to port 8000 I will get message...

Is Jetty guarenteed to be up after start() returns?

I am seeing a phenomenon where sometimes, connections to the port Jetty is configured on fail with connection refused, shortly after the server starts (after Server.start() returns). Is there some asynch behaviour involved? Is start() synchronous or not? ...

What JNDI environment properties do I use for Jetty?

Hi, I'm running jetty-6.1.7 and I've got an ActiveMQConnectionFactory that I'd like to reference in my spring configuration via a JNDITemplate. My jetty.xml configuration is vanilla: <New id="connectionFactory" class="org.mortbay.jetty.plus.naming.Resource"> <Arg>jms/connectionFactory</Arg> <Arg> <New class="org.apach...

How to secure Jetty to only allow access from loopback(localhost)

How can I secure jetty to only allow connections from localhost? This means a connection to server A from Client/Server B has to fail. I know I can do this by configuring my firewall (so please no answers about this). I just want jetty to not listen on localhost. I used google with for example "jetty localhost" but it did not return any ...

Grails application root path

Is there a variable where I can find out the root directory of my Grails application? for example, I have a folder named "chart" under \%root%\web-app\images\ where I put my charts in. Once I deploy my grails application on Jetty, I will get FileNotFoundException because the root path becomes /srv/www/vhosts/domain-name/jetty-version/ ...

Programmatically registering a servlet in Jetty 7

Hi, I'm trying to register a Servlet in Jetty 7.0 programmatically. All the examples I find are for Jetty 6, and Jetty 7 is quite different. Here is my server side: import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; public class Bootstrapper { public static void main(String[] args) th...

maven jetty plugin - how to control vm arguments?

How to set vmargs for jetty runned from maven-jetty-plugin? I need for example to pass -Xmx argument to Jetty which run as maven-plugin (maven-jetty-plugin) by "mvn jetty:run" command. ...

Problem setting up GzipFilter in Jetty

I'm trying to setup Jetty to serve compressed html content. In web.xml I setup GzipFilter and mapped it to /* but this doesn't seem to work. Here's the filter configuration: <filter> <filter-name>GZipFilter</filter-name> <display-name>Jetty's GZip Filter</display-name> <description>Filter that zips all the content on-the-fly</descrip...

Embedded Jetty and SOAP

I am trying to run an embedded Jetty and would like to expose a soap webservice. The project is loaded as a WAR generated by netbeans. The webservice is generated from a WSDL. What is the simplest way to add SOAP support to embedded Jetty ...

IOException: Too many open files

I'm trying to debug a file descriptor leak in a Java webapp running in Jetty 7.0.1 on Linux. The app had been happily running for a month or so when requests started to fail due to too many open files, and Jetty had to be restarted. java.io.IOException: Cannot run program [external program]: java.io.IOException: error=24, Too many open...