Closed jigyasa-grover closed 8 years ago
Er, they are there on loklakserver.java. look closely
@shivenmian Where to look closely ?
Edit: If you mean their classes were imported ? But their servlets were never added.
Check lines 490-526 and 535-593 in https://github.com/loklak/loklak_server/blob/development/src/org/loklak/LoklakServer.java. Servlets are registered here.
@shivenmian I dont see any servletHandler.addServlet(..)
for them
Check lines 527-532, they are added in a loop.
Also, adding them in Class<? extends Servlet>[] services = new Class[]{...}
is left, which I am pushing in the next commit.
No you're doing it wrong. That's not to be done. There are two ways of registering.
@shivenmian
for (Class<? extends Servlet> service: services)
try {
servletHandler.addServlet(service, ((APIHandler) (service.newInstance())).getAPIPath());
} catch (InstantiationException | IllegalAccessException e) {
e.printStackTrace();
}
I get the point that they are being added in the loop. But I guess I need to add them in the list of services
at least ?
@shivenmian That's what I meant, rectifying in the next commit.
490-526 exactly is the list of services. Just add them there. The remaining five servlets.
@shivenmian Got that already :) Thanks.
@shivenmian A new PR has been opened https://github.com/loklak/loklak_server/pull/815/files
It has been observed that many services which have been successfully implemented as console services are not registered individually in
loklakserver.java