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

  • Home
  • SEARCH
  • 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 232035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:59:00+00:00 2026-05-11T19:59:00+00:00

Hey yall, I have a wicket- and also a server-related question: We built a

  • 0

Hey yall, I have a wicket- and also a server-related question:

We built a little server with java (yeah, I know, why re-invent the wheel … I got that a lot when I asked the question on the wicket-mailing-list) …. so let’s just say, it is desperately needed b/c … ehm … I still can’t think of a good reason, but there’s not a lot I can do about it … so I finally got this little server to run servlets … as far as I know, to run wicket you need a server that can run servlets … (as for my lack of english let’s just say: it is supposed to be a servlet container like tomcat) … now that I do have this very beautiful server, does anybody have an idea what I have to do, so that my wicket-apps run on it? how do I tell my server that it is supposed to run a wicket-app?

Hope I explained it well …
thnx in advance 🙂

… dg


ok, a little source … I did this following a tutorial:

HttpServer where the “magic” happens:

 while (!shutdown) {
  // ... all the stuff before

    //check if this is a request for a servlet or a static resource
    //a request for a servlet begins with "/servlet/"
    if (request.getUri().startsWith("/servlet/")) {
        System.out.println( "SERVLET-REQUEST\n\n" );
      ServletProcessor2 processor = new ServletProcessor2();
      processor.process(request, response);
    }
    else {
        System.out.println( "STATICRESOURCE-REQUEST" );
      StaticResourceProcessor processor = new StaticResourceProcessor();
      processor.process(request, response);
    }
 // ... all the stuff after
}

Now the ServletProcessor:

public class ServletProcessor2 {

public void process(Request request, Response response) {

 String uri = request.getUri();
 String servletName = uri.substring(uri.lastIndexOf("/") + 1);
 System.out.println( "SERVLETNAME ... " + servletName );
 URLClassLoader loader = null;

try {
   // create a URLClassLoader
   URL[] urls = new URL[1];
   URLStreamHandler streamHandler = null;
   File classPath = new File(Constants.WEB_ROOT);
   // the forming of repository is taken from the createClassLoader method in
   // org.apache.catalina.startup.ClassLoaderFactory
   String repository = (new URL("file", null, classPath.getCanonicalPath() + File.separator)).toString() ;
   System.out.println( "REPOSITORY ... " + repository );
   // the code for forming the URL is taken from the addRepository method in
   // org.apache.catalina.loader.StandardClassLoader class.
   urls[0] = new URL(null, repository, streamHandler);
   loader = new URLClassLoader(urls);
 }
 catch (IOException e) {
   System.out.println(e.toString() );
 }
 Class myClass = null;
 try {
   myClass = loader.loadClass(servletName);
 }
 catch (ClassNotFoundException e) {
   System.out.println("FEHLER: " + e.toString() + " ... CAUSE: " + e.getCause() );
   e.printStackTrace();
 }

 Servlet servlet = null;
 RequestFacade requestFacade = new RequestFacade(request);
 ResponseFacade responseFacade = new ResponseFacade(response);
 try {
     servlet = (Servlet) myClass.newInstance();
     servlet.service((ServletRequest) requestFacade, (ServletResponse) responseFacade);
 }
 catch (Exception e) {
   System.out.println( "Fehler: " + e.toString() + " ... CAUSE: " + e.getCause() );
   e.printStackTrace();
 }
 catch (Throwable e) {
   System.out.println(e.toString());
 }

}
}
  • 1 1 Answer
  • 1 View
  • 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-05-11T19:59:00+00:00Added an answer on May 11, 2026 at 7:59 pm

    the simple answer is that you will need to implement the Servlet API. The wicket documentation doesn’t seem to say what the exact required version but I’m sure it’ll be at least 2.4. Not a job I’d recommend you do, it’s a difficult thing to do correctly and your just opening your self to a world of pain.

    If you need to embed a server then might I recommend you start with jetty and customise it to meet what ever requirements you have. Jetty has a very permissive license so you don’t have to worry about using in a commercial product and can scale pretty much with the best of them.

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

Sidebar

Related Questions

Hey I have been following gcm tutorial to create gcm-demo-server and a demo-client. All
Hey peoples, I've been studying Java for a couple of weeks, and have decided
Hey i have been looking around and i cant find a way to get
*Hey , I have finished developing my app In my iphone apps I have
hey guys having this really simple problem but cant seem to figure out have
Hey guys I have a object sitting in my tile map for spawn point
hey guys how to make these php html links codes possible. i have tried
hey guys I have the follow code in js: $(document).ready(function(){ $(.replyLink).click(function(){ $(#form-to-+this.id).html(htmlForm()).toggle(500); return false;
Hey I have a menu(with JQuery) in a div on the left, with all
Hey guys I have about 8 fieldSets and Im iterating over a list. I

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.