-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloud Web Terminal running in Tomcat #2
Comments
Plus you need to setup a SpringBootServletInitializer class if you want to deploy it to standard servlet container. This will be picked up by tomcat and initialize your app. See https://docs.spring.io/spring-boot/docs/current/reference/html/howto-traditional-deployment.html |
Thanks man! This is my complete 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>cloudterm</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>cloudterm</name>
<description>Cloud Web Terminal</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
<maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.kodedu.pty4j</groupId>
<artifactId>pty4j</artifactId>
<version>0.7.4</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>pty4j-releases</id>
<url>https://github.com/javaterminal/pty4j/raw/master/releases</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<finalName>cloudterm</finalName>
</configuration>
</plugin>
</plugins>
</build>
</project> This is my main class changed: package com.kodedu.cloudterm;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
@SpringBootApplication
public class AppStarter extends SpringBootServletInitializer
{
public static void main(String[] args) {
SpringApplication.run(AppStarter.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(AppStarter.class);
}
} And this is the log from catalina.out in app startup: PS.: I did the tests in Tomcat 8.0.52 (my current version) and Tomcat 8.5.31 (just for conference) |
Plus I tried with Spring Boot 1.5.13.RELEASE and with ServletInitializer class like https://start.spring.io and the same blank page is showing. |
Normally it should work, but it didn't work for me too. ServletIinitializer isn't triggered. |
Could you help me please open the terminal page when deployed in Tomcat?
I know the best way to run the cloudterm is standalone way from JAR, but I have no permissions for that in my Server, so I need run in Tomcat
This is my scenario was tried:
The text was updated successfully, but these errors were encountered: