Dear BaseX-fellows,
the websocket-feature in 9.1 is great. Now- to use ist, I need the BaseX-Version with embedded Jetty. My problem is, that I need another web app, too. Up to now, I used Tomcat as container for BaseX and the other webapp. Is it possible, to deploy another app in the embedded Jetty ? Any hints, how to do that? In Tomcat and - as far as I know in a standard Jetty installation - I just copy the .war into the webapps-Folder. That doesn´t work in the embedded Jetty.
I would be glad for hints.
Sincerely Dieter Zanzinger
Hello Dieter,
I've just tested 9.1 - and sockets (started with mvn jetty:run), worked without issues.
All you need is the jetty maven plugin, configured like https://github.com/BaseXdb/basex/blob/master/basex-api/pom.xml#L107
If you start the BaseXHTTP class, it starts Jetty from code but also tries to load the WEB-INF/web.xml file. For example, to add the SparkJava filters, I've just added the <filter> and it was picked up correclty at /spark/*
<filter> <filter-name>SparkFilter</filter-name> <filter-class>spark.servlet.SparkFilter</filter-class> <init-param> <param-name>applicationClass</param-name> <param-value>com.example.spark.MySparkApplication</param-value> </init-param> </filter> <filter-mapping> <filter-name>SparkFilter</filter-name> <url-pattern>/spark/*</url-pattern> </filter-mapping>
Br, Max Am Sa., 27. Okt. 2018 um 16:09 Uhr schrieb Dieter Zanzinger dieter.zanzinger@icloud.com:
Dear BaseX-fellows,
the websocket-feature in 9.1 is great. Now- to use ist, I need the BaseX-Version with embedded Jetty. My problem is, that I need another web app, too. Up to now, I used Tomcat as container for BaseX and the other webapp. Is it possible, to deploy another app in the embedded Jetty ? Any hints, how to do that? In Tomcat and - as far as I know in a standard Jetty installation - I just copy the .war into the webapps-Folder. That doesn´t work in the embedded Jetty.
I would be glad for hints.
Sincerely Dieter Zanzinger
basex-talk@mailman.uni-konstanz.de