Comments (6)
Hi @dgrecoBill1st what's the version of Spring and Tomcat you have tested this with?
Our Java implementation is limited to the Servlet API version 3.1 which is spring 2.
from unit.
Spring Boot 2.7.18
Tomcat 9.0.83
from unit.
Any ideas on this? Really would like to utilize unit for this small project requiring java, as our primary infrastructure is PHP on Unit already.
from unit.
Good evening @dgrecoBill1st sorry for the long response time.
Can you share a WAR file for diagnosis or share a simple example on how to reproduce this?
from unit.
Sure, attaching the war here (renamed to add .zip as cannot upload war)
crypt-0.0.1.war.zip
crypt-0.0.1.war.zip
. Here is the full setup and steps:
pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bill1st</groupId>
<artifactId>crypt</artifactId>
<version>0.0.1</version>
<properties>
<start-class>com.bill1st.CryptApplication</start-class>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.18</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Built with maven 3.5.4
Application is simple hello world controller mapped to / URI
Configured Unit:
http://localhost/config/listeners/127.0.0.1:8312
{
"pass": "routes/crypt"
}
http://localhost/config/routes/crypt
[
{
"match": {
"uri": "*"
},
"action": {
"pass": "applications/crypt"
}
}
]
http://localhost/config/applications/crypt
{
"type": "java",
"webapp": "/var/www/crypt/crypt-0.0.1.war",
"working_directory": "/var/www/crypt/",
"environment": {
<REDACTED>
}
}
And the result:
curl http://127.0.0.1:8312
<a href="META-INF">META-INF</a><br>
<a href="WEB-INF">WEB-INF</a><br>
from unit.
Closing ticket, I did a new clean build of the project and it works in unit now.
from unit.
Related Issues (20)
- Unit fails to build against njs 0.8.2 and libxml2 2.12, or njs 0.8.3 HOT 3
- ./configure: error: no PHP embed SAPI found when there is no libphp.so HOT 10
- Issue with creating files and folders from PHP HOT 3
- WebsocketConnection WebSocket onerror while trying nginx htpasswd protection HOT 1
- Using `vars` multiple times in `access_log.format` does not work correctly with njs HOT 3
- App process XXXX exited on signal 7 HOT 1
- Broken stdout and stderr logging in Amazon Linux HOT 4
- Application restart breaks WebAssembly Components HOT 8
- How to pass $request_id to my application?
- Support for modifying request headers HOT 3
- Ability to read mounted configuration file HOT 5
- Very hard to run .sh scripts from within Flask app HOT 2
- Consider updating containers to bookworm base image HOT 3
- OpenSSL 3.2.1 breaks TLS related pytests HOT 4
- Module `wasm-wasi-component` is not found among available application modules HOT 3
- Choosing TLS library at startup time HOT 4
- Cant install npm package `unit-http`, "libunit version mismatch" HOT 5
- Add WebSocket support for `ws` moudle in `unit-http`
- Bug: Proxy validation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unit.