I want to prevent my CSSs from being cached on the browser side. How can I do it in embedded Jetty instance?
If I were using xml configuration file, I would add lines like:
<init-param>
<param-name>cacheControl</param-name>
<param-value>max-age=0,public</param-value>
</init-param>
How I can turn that into the code?
Right now I ...
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();
...
Jetty can be used as a library to embed a servlet-server into your application. To do that, you create an instance of the class Server and call start at some point. This method throws Exception. Catching or throwing a pure Exception (not a specialized subclass) is bad style. Does anyone know, how I can avoid this and get a Jetty-server i...
I have embedded Jetty in a java application and am calling the start() method on an instance of the Jetty server object (after setting a handler list which describes the location of the static and dynamic web content). Does the start() call block until initialization is complete? If not, how do I determine when the server is fully star...
Hey people, it's my first question here.
I successfully embedded Jetty on a test application. It can serve files without issues.
Now I want to know if it's possible for Jetty to serve files that are inside its own Jar file.
Does anyone know if that's possible?
Thanks!
...
I'm trying to call a web service in my back end java code when it's
running in hosted mode. Everything loads fine, the GWT RPC call works
and I can see it on the server, then as soon as it tries to call an
external web service (using jax-ws) the jetty falls over with a
Internal Server Error (500).
I have cranked the log all the way...
Hi, i have an spring web application (on glassfish server) that use JDBC connection pool. It defined in XML file like this:
<resources>
<jdbc-connection-pool allow-non-component-callers="true" associate-with-thread="true"
connection-creation-retry-attempts="2" connection-creation-retry-interval-in-seconds=...
Can anybody help with this?
I want to use an embedded Jetty 7 as Endpoint. This is what I tried:
public class MiniTestJetty {
@WebService(targetNamespace = "http")
public static class Calculator {
@Resource
WebServiceContext context;
public int add(int a, int b) {
return a + b;
}
}
public static void main(S...
Hi StackOverflow!
My application requires several interface implementations which require a Jetty server to do their job. This is, however, not necessarily the case in every implementations of those interfaces so the Jetty server is only a dependency.
Since it would be a huge amount of pain to wrap the entire jetty server with all its ...
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...
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...
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
...
i have windows service app and i want to use web interface for my app instead of gui. But i wonder how to make a servlet in jetty communicate with its hosted application - the windows service app.
Thank you.
...
I am writing a web application that runs within an embedded Jetty instance.
When I attempt to execute a JSTL statement, I receive the following exception:
org.apache.jasper.JasperException: /index.jsp(1,63) PWC6188: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed wit...
Hello,
i have a webapp (http://sourceforge.net/projects/sf-mvn-plugins/files/m2-repo/net/sf/maven/plugins/example-captaincasa-jnlp/0.1-SNAPSHOT/example-captaincasa-jnlp-0.1-SNAPSHOT.war/download) wich use jsf in a servlet container. This works fine with jetty-maven-plugin run-war target at my local pc. In the future i would like make mo...
I use Google Appengine for Java (GAE/J).
On top, I use the Jersey REST-framework.
Now i want to run local JUnit tests. The test
sets up the local GAE development environment ( http://code.google.com/appengine/docs/java/tools/localunittesting.html ),
launches an embedded Jetty server,
and then fires requests to the server via HTTP a...
What are the benefits of embedding jetty vs deploying your webapp(s) in jetty? If you are planning on deploying more than one web app, should you strictly stick with deploying a war file for each web app (as opposed to writing an embedded server which calls each web app)?
...
I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter:
props.put("applicationClassName", MainApplication.class.getName());
service = (HttpService)context.getService(httpReference);
service.registerServlet("/",...
No matter what I start up, Visual VM just gives me "Unknown Application" and "Not supported for this JVM" on my Mac.
I've tried JBoss, Jetty, Eclipse - just to see if it would be able to identify / profile anything, and so far, nada.
$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M302...
I have one web app works perfectly under linux with jetty-6.1.22. However, when I tried to run it under windows, it throws an exception right at the initialization:
java.lang.IllegalArgumentException: name
at sun.misc.URLClassPath$Loader.findResource(Unknown Source)
at sun.misc.URLClassPath.findResource(Unknown Source)
...