abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Primmer" <david.prim...@gmail.com>
Subject need help with the custom provider example
Date Fri, 11 Apr 2008 21:04:36 GMT
I'm doing server setup that I thought should be better documented.
Basically, I'd like to make the CustomProvider example work with a
web.xml based setup. I see some info on it on the wiki but the example
itself uses java code to compose the app and to start jetty.

So I made a CustomSampleServlet that extends AbderaServlet and re-uses
the other two files from the custom example.

This is what it does:

public class CustomSampleServlet extends AbderaServlet {

  private final static Log log = LogFactory.getLog(AbderaServlet.class);

  @Override
  protected Provider createProvider() {
    return new CustomProvider();
  }

  @Override
  public void init() {
    log.debug("Initialing Abdera Servlet");
    manager = createServiceManager();
    provider = createProvider();
    log.debug("Using provider - " + provider);
  }

}


Then in my web.xml I have what is at the bottom of this page:
http://cwiki.apache.org/confluence/display/ABDERA/Your+first+AtomPub+Server


line 179 of ServletRequestContext does:
Abdera abdera = provider.getAbdera();

but returns null. This doesn't seem right. Next thing i know, i have a
null pointer exception on ServletRequestContext.getHost. Can someone
help with the provider bootstrap code?

Does this have something to do with leaving out this sort of thing?:
servletHolder.setInitParameter(ServiceManager.PROVIDER,
CustomProvider.class.getName());

thanks.

davep

Mime
View raw message