Building a Java Web Application with IntelliJ IDEA Community Edition and Docker

preview_player
Показать описание
Learn how to build Java web applications effortlessly using IntelliJ IDEA Community Edition and Docker. Follow our step-by-step tutorial for seamless deployment and scalability. Perfect for beginners and experienced developers alike. Watch now!
Рекомендации по теме
Комментарии
Автор

web.xml:
<?xml version="1.0" encoding="UTF-8"?>

version="4.0">

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>


</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>

</servlet-mapping>

<!-- Welcome files -->
<welcome-file-list>

</welcome-file-list>

<context-param>


</context-param>
</web-app>

dr.sergei
Автор

index.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>


<f:view>
<h:outputLabel value="Hey"/>
</f:view>

</html>

dr.sergei
Автор

pom file:




<packaging>war</packaging>

<name>ecommerce Maven Webapp</name>


<dependencies>
<dependency>
<groupId>junit</groupId>

<version>3.8.1</version>
<scope>test</scope>
</dependency>

<!-- Jakarta platform -->
<dependency>


<version>9.0.0</version>
<scope>provided</scope>
</dependency>

</dependencies>
<build>
<finalName>login</finalName>
<plugins>
<!-- Execute maven plugin-->
<plugin>


<version>3.1.0</version>

<executions>
<!-- Docker Tomee container building-->
<execution>
<id>container building</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>

<commandlineArgs>run -tdi -p 8002:8080 --name xxx2
<successCodes>
<successCode>0</successCode>

</successCodes>
</configuration>
</execution>
<!-- Docker Tomee container starting-->
<execution>
<id>container starting</id>

<goals>
<goal>exec</goal>
</goals>
<configuration>

<commandlineArgs>start xxx2</commandlineArgs>
</configuration>
</execution>
<!-- Docker war file deploying-->
<execution>
<id>war deploying</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>

<commandlineArgs>cp
</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven compiler plugin-->
<plugin>


<version>3.11.0</version>
<configuration>
<source>20</source>
<target>20</target>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-proc:none</arg>
</compilerArgs>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- Maven war plugin-->
<plugin>


<version>3.4.0</version>
<configuration>


<warName>login</warName>
<archive>
<manifest>

</manifest>
<manifestEntries>

</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>

dr.sergei
visit shbcf.ru