I have a problem starting it ActiveMQ Web Console 6.1.2 Uses: Gradle, ActiveMQ Web Console 6.1.2 + Jetty 11.0.2 + SpringBoot 3.3.4 server Jetty started I can't run the page http://localhost:8169/admin the page returns: HTTP ERROR 404 Not Found
@SpringBootApplication public class JettyServer { @PostConstruct private void init() { configureSystemProperties(); } public static void main(String[] args) throws Exception { System.setProperty("webconsole.jmx.url", "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"); System.setProperty("webconsole.jms.url", "tcp://localhost:61611"); int portSerwer = 8169; Server server = new Server(portSerwer); configureSystemProperties(); HashLoginService loginService = new HashLoginService("MyRealm"); loginService.setConfig(Paths.get("users.properties").toAbsolutePath().toString()); server.addBean(loginService); WebAppContext context = new WebAppContext(); context.setContextPath("/admin"); context.setParentLoaderPriority(true); context.setInitParameter("webconsole.brokerUrl", "tcp://localhost:61611"); context.setInitParameter("webconsole.username", "admin"); context.setInitParameter("webconsole.password", "admin"); context.setWar("activemq-web-console-6.1.2-new.war"); context.setWelcomeFiles(new String[]{"index.jsp"}); context.setExtractWAR(true); ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler(); Constraint constraint = new Constraint(Constraint.__BASIC_AUTH, "console-admin"); constraint.setAuthenticate(true); ConstraintMapping mapping = new ConstraintMapping(); mapping.setConstraint(constraint); mapping.setPathSpec("/admin/*"); ServletHolder jspHolder = new ServletHolder(org.eclipse.jetty.jsp.JettyJspServlet.class); jspHolder.setInitParameter("fork", "false"); jspHolder.setInitParameter("xpoweredBy", "false"); jspHolder.setInitParameter("jakarta.servlet.jsp.jstl", "3.0.1"); context.addServlet(jspHolder, "*.jsp"); securityHandler.addConstraintMapping(mapping); securityHandler.setLoginService(loginService); securityHandler.setHandler(context); server.setHandler(securityHandler); try { server.start(); server.join(); } catch (Exception e) { e.printStackTrace(); } } private static void configureSystemProperties() { System.setProperty("webconsole.type", "default"); System.setProperty("webconsole.jmx.url", "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"); System.setProperty("webconsole.jms.url", "tcp://localhost:61611"); } } Can anyone help me get started? *Pozdrawiam* Piotr Pabian tel: 533 705 707 e-mail: g <p.pab...@grune.pl>rune.pab...@gmail.com