Page JS introduces the static resource method in the jar package
The key is to package the static resources into the META-INF/resources directory of the jar, maven settings:
<resource>
<directory>${basedir}/src/main/webapp</directory>
<includes>
<include>assets/**</include>
</includes>
<targetPath>META-INF/resources</targetPath>
</resource>
Just import js directly on the page:
<script src="assets/server.js" type="text/javascript"></script>
If you need to overwrite a file with the same name, you can overwrite it by creating a new file with the same name under the same resource directory of the current project.