I need to add css and js to the jsp files in a jax-rs app running on glassfish5. 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>elearning_ontology</artifactId>
<version>1.0-SNAPSHOT</version>
<name>elearning_ontology</name>
<packaging>war</packaging>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<junit.version>5.6.2</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.mvc</groupId>
<artifactId>javax.mvc-api</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.krazo</groupId>
<artifactId>krazo-jersey</artifactId>
<version>1.1.0-M1</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-distribution</artifactId>
<version>5.1.17</version>
</dependency>
<dependency>
<groupId>com.github.galigator.openllet</groupId>
<artifactId>openllet-owlapi</artifactId>
<version>2.6.5</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</build>
</project>
i tryed to add css using relative path or c:url but no chance:
<link rel="stylesheet" href="<c:url value = "bootstrap-rtl.min.css"/>" media="screen">
<link rel="stylesheet" href="assets/css/bootstrap-rtl.min.css" media="screen">
when i view page source and click on css url i see a 404 page. i guess i should do some config via Application or web.xml .but i dont know how
P.S: it is a restfull mvc app. so all routes are controlled through the controller class .
so (maybe) there is only access to paths that are defined in controller or defined in a config file. relative or absolute paths not work.
