Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8616641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:40:07+00:00 2026-06-12T05:40:07+00:00

I’m trying to setup a minimal HTTP over SPDY server with Jetty , for

  • 0

I’m trying to setup a minimal HTTP over SPDY server with Jetty, for testing purposes. I’m working on this code:

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.spdy.http.HTTPSPDYServerConnector;
import org.eclipse.jetty.util.ssl.SslContextFactory;

import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler;

public class MySPDYHelloServer {
    public static void main(String[] args) throws Exception {
        Server server = new Server();

        SslContextFactory sslFactory = new SslContextFactory();
        sslFactory.setKeyStorePath("dummy_keystore.jks");
        sslFactory.setKeyStorePassword("password");
        sslFactory.setProtocol("TLSv1");

        Connector connector = new HTTPSPDYServerConnector(sslFactory);
        connector.setPort(8443);
        server.addConnector(connector);

        server.setHandler( new AbstractHandler(){
            public void handle(String target, Request baseRequest,
                    HttpServletRequest request, HttpServletResponse response)
                    throws IOException, ServletException {
                response.setContentType("text/html;charset=utf-8");
                response.setStatus(HttpServletResponse.SC_OK);
                baseRequest.setHandled(true);
                response.getWriter().println("<h1>Hello World</h1>");
            }
        } );

        server.start();
        server.join();
    }
}

I’ve generated the keystore with:

keytool -genkey -keystore dummy_keystore.jks

When I point Google Chrome (SPDY enabled) to https://localhost:8443 it warns me about the untrusted certificate then loads forever.

The pure SPDY client-server examples (from here) work and a simple HTTPS server work too; the issue seems related to the HTTPSPDYServerConnector class.

Here’s the list of the JARs that I’m using:

jetty-all-7.6.7.v20120910.jar
npn-boot-7.6.2.v20120308.jar
servlet-api-2.5.jar
spdy-core-7.6.7.v20120910.jar
spdy-jetty-7.6.7.v20120910.jar
spdy-jetty-http-7.6.7.v20120910.jar

And for what concerns my Java environment:

$ cat /opt/jdk1.7.0_07/release 
JAVA_VERSION="1.7.0"
OS_NAME="Linux"
OS_VERSION="2.6"
OS_ARCH="i586"

Solution addendum

jesse mcconnell provided the answer, anyway those who use Eclipse may find the following useful.

The JAR npn-boot-7.6.2.v20120308.jar must (also) be placed in:

Run Configurations... -> Classpath -> Bootstrap Entries -> Add External JARs

Note that since order matters, that entry must appear before the JRE System Library.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:40:09+00:00Added an answer on June 12, 2026 at 5:40 am

    Are you using the npn-boot as a bootclasspath jar when starting this up?

    Stock jvm will not support npn (next protocol negotiation) and spdy will not work, so you have to make sure that the npn-boot jar is being used in conjunction with -Xbootclasspath option. The kinda sounds like your issue since your dealing with certificate loading and then its stalling…also that you refer to npn-boot as a dependency when it is more of a replacement of jvm classes then a typical dependency.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.