Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Servlet with Osgi bundle issue
hi
i am follow Servlets-in-a-Module, create an api module.
but when i try access the servlet (http://localhost:8080/o/cwh/trigger/), i got
2023-08-04 10:16:02.280 WARN [https-jsse-nio-443-exec-40][code_jsp:159] {code="404", msg="ProxyServlet: /cwh/trigger/", uri=/o/cwh/trigger/}
2023-08-04 10:16:10.326 WARN [https-jsse-nio-443-exec-23][code_jsp:159] {code="404", msg="ProxyServlet: /cwh/trigger", uri=/o/cwh/trigger}
@Component(immediate = true, property = {
"osgi.http.whiteboard.context.path=/"
,"osgi.http.whiteboard.servlet.name=com.dpc.ci.cwh.servlet.ChatWebhook"
, "osgi.http.whiteboard.servlet.pattern=/cwh/trigger/*"
}
, service = Servlet.class)
public class ChatWebhook extends HttpServlet {
can anyone help please, thanks in advance.
You seem to be missing the /o/ in the URL (pointing to where the OSGi framework listens).
Try http://localhost:8080/o/cwh/trigger/
hi Olaf
i updated the question, sorry for missed the /o/,
I use http://localhost:8080/o/cwh/trigger/
got that error message.
and, it was works fine for a while, for some reason I do not know, it doesn't work, and I got the error message.
for record
it's weare, i deleted folder "osgi/state", and copied a new (orangnal) osgi/state, and restart server.
the servlet is back.
update
it's weird, i delete /osgi/state and copy an original /osgi/state, restart server, it works again.
Powered by Liferay™