I am trying to load an applet to make it display inside my wicket page. I am
using the embedded jetty and I bring up the server by calling this main
method:


  public static void main(String[] args) throws Exception {
    Server server = new Server();
    SocketConnector connector = new SocketConnector();
    connector.setPort(8080);
    server.setConnectors(new Connector[] { connector });

    WebAppContext bb = new WebAppContext();
    bb.setServer(server);
    bb.setContextPath("/projectoverviewer");
    bb.setWar("webapp");
    server.addHandler(bb);

    try {
      System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY
TO STOP");
      server.start();
      while (System.in.available() == 0) {
        Thread.sleep(5000);
      }
      server.stop();
      server.join();
    }
    catch (Exception e) {
      e.printStackTrace();
      System.exit(100);
    }
  }


And my applet tag is as following:

&lt applet code="mypackage.myapplet.class" codebase="."
archive="dependent.jar" />


The problem I have with the embedded jetty is that when it gets to the
applet page, it's looking for the applet class in
http://localhost:8080/mywebapp/mypackage/myapplet.class (according to the
Java console). It doesn't find the class file there. I want to know what is
the underneath file structure after the http://localhost:8080/ URL? Also I
want to know how does wicket loads the the classes files in that URL format,
so I can specify the correct value for the "codebase" attribute.


I have read some threads about the similar problems, but all of them seem to
deploy a war file with a certain file structure inside. The embedded jetty
doesn't even create a war file, and I want to stick to the embedded jetty,
so how do I solve this problem? Thanks!
-- 
View this message in context: 
http://www.nabble.com/How-to-load-applet-in-wicket-while-using-embedded-jetty--tp16737094p16737094.html
Sent from the Wicket - User mailing list archive at Nabble.com.

Reply via email to