embedded-jetty

Error while executing WAR file

匆匆过客 提交于 2019-12-24 06:03:11
问题 I have used maven plugin to build a war file for my project structure. And now when I run this war file, I get the error Error: Could not find or load main class com.abc.HelloWorld.App For some reason, when I check the war file, my main class is getting generated under WEB-INF/classes/com/abc/HelloWorld/ I have tried added a classpath to Manifest.MF file, but it has not helped. Here is my maven plugin for creating a war file. Also this project contains an embedded jetty server. <plugin>

Error while executing WAR file

被刻印的时光 ゝ 提交于 2019-12-24 06:02:46
问题 I have used maven plugin to build a war file for my project structure. And now when I run this war file, I get the error Error: Could not find or load main class com.abc.HelloWorld.App For some reason, when I check the war file, my main class is getting generated under WEB-INF/classes/com/abc/HelloWorld/ I have tried added a classpath to Manifest.MF file, but it has not helped. Here is my maven plugin for creating a war file. Also this project contains an embedded jetty server. <plugin>

Embedded Jetty - Adding Context after starting Jetty Server

跟風遠走 提交于 2019-12-24 02:47:09
问题 Is it right to start a jetty instance with no context specified and no context handler, then keep adding context to it once the server has started. Although I was able to do this using mutable HandlerCollection and the logs says the Server and the Contexts are started and available, I am not able to access it with the URL. Or should we add at least one root context and contexthandler to the server while starting it? I did something similar to the example suggested in below link. Jetty 9

Embedded Jetty fails to load JSP taglibs when classpath specified in jar

Deadly 提交于 2019-12-24 02:18:16
问题 I'm running into a problem that doesn't seem to be addressed by the similar questions. I have an app that embeds Jetty, using SpringMVC, JSPs and taglibs. I use a maven plugin to generate a jar, bundle all the dependent jars into a directory and create a manifest. When I run the app using the jar (eg. java -jar app.jar) everything works fine until I try to load a JSP that specifies <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> or any other taglib for that matter. If I run

WSDL binding URL changes protocol to HTTP when behind an SSL termination

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 02:05:47
问题 We have a simple jax-ws SOAP server backed by Apache CXF 3.2.6 in standalone (self-hosted) mode that uses an embedded Jetty. The server was generated wsdl-first using CXF's wsdl2java . WSDL is a file on the classpath, and that physical WSDL file has https://.... in the location attribute of the soapbind:address element. When started, the server publishes to http://0.0.0.0:8080 . The server also sits behind an SSL termination that routes https://external-name -> SSL termination -> http:/

Spring + PostgreSQL > Multiple SLF4J bindings

不羁岁月 提交于 2019-12-23 12:44:44
问题 Im currently trying to setup a Spring 4 / Hibernate 4 / PostgreSQL project. When I add the JDBC driver for PostgreSQL, i get following exception: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/Thomas/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.7/8095d0b9f7e0a9cd79a663c740e0f8fb31d0e2c8/slf4j-simple-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/Thomas/.gradle/caches/modules-2/files-2

Servlet 3.0 support in embedded Jetty 8.0

a 夏天 提交于 2019-12-23 09:27:48
问题 For my unit-tests I use a simple test-server based on Jetty: package eu.kostia.textanalysis.webservices.jetty; import java.awt.Desktop; import java.net.URI; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.webapp.WebAppContext; public class TestServer { static private final String CONTEXT_PATH = "/webservice"; static private final String PROJECT_HOME = System.getenv("MY_WORKSPACE_HOME") + "/WebServices"; static public final int PORT = 8080; private Server server; private

Jetty UserRealm redirect on 3th failed login

对着背影说爱祢 提交于 2019-12-23 03:39:18
问题 If I have a custom Jetty UserRealm implementation and its configured for basic authentication (with SSL), is there any way to get it to go to an specific page after the 3rd failed login? Well really I just want to display some contact information to the user if they cannot login after 3 attempts. Alternatively is it possible to display the exception which I throw from the public Principal authenticate(final String username, final Object credentials, final Request request) method when its

Apache Shiro with Embedded-Jetty or Spark-Java - Is it possible?

主宰稳场 提交于 2019-12-23 02:44:09
问题 Does anyone have an example project on how I could integrate Shiro with Spark-Java/Jetty(embedded) please? I can see from http://sparkjava.com/documentation#filters that it must be the way. But not sure what would be the smartest way to do this according to https://shiro.apache.org/web.html If you may have any examples, appreciate much! 来源: https://stackoverflow.com/questions/54835994/apache-shiro-with-embedded-jetty-or-spark-java-is-it-possible

Embedded Jetty and Complex Logging

ⅰ亾dé卋堺 提交于 2019-12-23 02:32:57
问题 Jetty 9 is used for the embedded server and everything works well. One thing that remains is the logging issue. Prior to that mvn:jetty-run brings his own logging setup with it and logs to the console. That is good for development. In the production environment we need something more special. Currently on start-up the SLF4J complains about, that there is no binding available, so we can chose freely. That is what we want to archive: We need to log to the console if we are starting in a non