We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I was not able to change the path of my resource using the Builder:
Config config = new Config.Builder() .host("127.0.0.1") .port(8080) // First try .path("/MapPush/api/") // Second try .resource("/MapPush/api/", EventResource.class) .build(); server = new Nettosphere.Builder().config(config).build(); server.start();
The first and second try don't give any results: my resource is always mapped to root /* Moreover, the log always shows the following line:
/*
10:04:52.050 [main] INFO o.atmosphere.cpr.AtmosphereFramework - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path: /*
The text was updated successfully, but these errors were encountered:
After observing the Config.Builder#resource(String path, Class<?> c):
Config.Builder#resource(String path, Class<?> c)
public Builder resource(String path, Class<?> c) { try { if (AtmosphereHandler.class.isAssignableFrom(c)) { handlers.put(path, AtmosphereHandler.class.cast(c.newInstance())); } else if (Servlet.class.isAssignableFrom(c)) { handlers.put(path, new ReflectorServletProcessor(Servlet.class.cast(c.newInstance()))); } else { // TODO: NOT clear applicationPath = path; initParam("com.sun.jersey.config.property.packages", c.getPackage().getName()); } } catch (Exception ex) { logger.error("Invalid resource {}", c); } return this; }
I understood that path means namespace of the resource class, not the servlet-mapping path. My mistake :)
Sorry, something went wrong.
No branches or pull requests
I was not able to change the path of my resource using the Builder:
The first and second try don't give any results: my resource is always mapped to root
/*
Moreover, the log always shows the following line:
The text was updated successfully, but these errors were encountered: